I have been trying to upload an image from WP7 to a server for a few days now but it's not going too well.
I can easily get the input stream for the image and convert it to a byte array but I can't figure out how to send the byte array...Does it have to be done using a web service?
I've been struggling to send the byte array using the web service because the maxReceivedMessageSize is always set to 65536 and I have tried so many ways to increase the size of it.
The maxReceivedMessageSize is easy to fix in the configuration on the server.
Another way you could do it is to just make an asp.net mvc action which accepts a post, and just post it as a file.
Have a look at these other questions on the same subject:
Uploading an image using C# and WebRequest?
and
Upload files with HTTPWebrequest (multipart/form-data)
Related
I developed a Django application and i have to process 500 documents (I have to upload them using a .zip/.rar and to process them one by one using NLP). The problem is that when i try to upload all the 500 documents my app takes so much time, around 2 hours. I would like to know what is the best way to upload these documents using the Django Framework? How can i upload them one by one so i will not have time out problems or too big file errors?
P.D The user wants to upload the 500 documents compressed in .zip/.rar file. He wants to upload this file once so the system has to process the 500 documents once. So i have to find a way to upload them without overloading my Web App. I tryied to upload them once, but the server process takes so much time uploading 500 documents and i can find http time out errors or too big entity errors.
Anyone answered so i will answer myself. I used Celery + Django. Celery let you create asynchronous tasks so you can create a process that is independent from your web app and it can work in the background. You can use RabbitMQ or Redis to send messages between your independent process and your application. Just search on Google : Celery + Django
Hi I m using JMeter to test a web service and I want to pass an image to that POST type web- Service using Jmeter.
Actually that Web Service takes the image in the form of byte array and I want that I will pass image to jmeter either by referencing image path or any other possible way and that image should be converted to byte array and that byte array I can pass to the WEB Service.
Please note that I know how to call the web service with simple parameter.
Check out
Need to send Byte Array through Webservice in jmeter question for solution
and How to use BeanShell: JMeter's favorite built-in component for explanation
some time ago I've read of a Webservice, that simulates a large number of clients to your Website / Webapp, which click randomly everywhere and log every error or timeout they produce with that behaviour. As far as I remember it was based on javascript.
It's like Zombie.js / Phantom.js, but only as a Service without having to do the setup self.
Does anybody know this service?
(Things I've already excluded: WebServiceStudio, Storm, SoapUi
I guess you want to test how well your webservice works. I have used JMeter which is very good.
http://jmeter.apache.org/
We are develpoing iPad application which should be download the contents (PDF, MP4, PPT) from server. For that we are develpoing a webservice to transfer the content. The size of the content is around 50 to 100 MB
I need some clarification for the following
As of my understanding, It is not possible to send the large contents as SOAP attachment.
If I make the content as web URL and transfer to iPad, the iPad can hit the URL and download the content.
What the main difference of the above solutions?
What would be the best approach for my requirement?
I would avoid a SOAP service if possible, as you will spend unnecessary time dealing with the SOAP wrappers. If you do need to use it, you can use a project such as wsdl2objc to generate the Objective C source. I would advise using a REST based service instead.
Yes, the iPad can hit a URL and download content. You might be better served by downloading it in pieces instead of a huge 50-100MB download (ie, download each file individually).
I want my customers to upload some file to my server. My current design is as below:
I make a folder on my server with R/W permission to Anonymous user like this: http://myserver/uploads
Customer contact my web service to indicate they want to upload something, and the webservice returned a path like this: http://myserver/uploads/xxx-xxx-xxx-xxx, the xxx part is a GUID.
But I don't know what to do next? I believe customer has the permission to write to the virtual path returned by the web service, but how could I write my client-side code so that it can actually copy things to that virtual path? My client-side is a Win32 application, not a web page.
What if I want the customer upload files within a web page, how to do that? I know that there's a "PUT" method in HTTP protocol that could be used to upload things to server, but how to use that?
I am new to this kind of web development. I hope I made myself clear. If there's any better design, please let me know.
Many many thanks.
Update - 1 - 0:59 2010/12/27
A similar question: How to upload a file to a WCF Service?
Some possible solutions:
Image Upload Web Service in C#.NET
Upload any type of File through a C# Web Service
Progress Indication while Uploading/Downloading Files using WCF
I would avoid allowing anyone to write files to a directory. I know you have set up permissions to help guard against anything bad happening, but it is still setup to where anyone can read/write to it, not just to person you've told the URL to. Security through obscurity is not a best practice.
What kind of webservice are you using? WCF, SOAP, something else all together? I would have the file upload still be a service call (not just some PUT command to a directory). That way you can still apply security if needed. When you get right down to it, a file is nothing more than an array of bytes, so you can have your web service accept an array of bytes and write it out to the correct location. If I had a better idea of what technologies you are using (php, asp.net, jsp, etc) Then I might be able to make more precise recommendations.
HTH
You can use SOAP attachments, or if not using SOAP, something similar - specifying filename, content type and binary data, Base64-encoded.