Receive an image posted to webpage

How do I receive an image posted to my ASP.NET website over an http request?

I'm not sure if I need to use a Web Service or if I can simply use an aspx page and get the image from the Request.QueryString?

my site is an ASP.NET (VB)
BrianFordAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
Neither one really.  You have to create a form page and a page to receive the form data.  Here is a Microsoft article on the subject: https://support.microsoft.com/en-us/kb/323246
0
BrianFordAuthor Commented:
Thanks but the link explains how to do it using a form where the user is selecting a local file and clicks an upload button.

The image file I need to receive is being posted to my site (actually from an iOS device) so I need to receive and process that file and return 'success' or 'fail'
0
Dave BaldwinFixer of ProblemsCommented:
As far as I know, there is no other method to do that on a web page.  Click on "Request Attention" to get others to look at your question.
0
ArkCommented:
You can use both methods (though QueryString limit depends on browser - from 2K in IE up to 100-200K for others. IIS accepts 16K). Plus you can post data with HTTP Post request.
If images are small use query string with base64 encoded image bytes. Create empty Page on your server and call it like: pageAddress?imageData=base64encodedstrin, then convert string back to byte array in Form_Load and save to disk. Write to response "Upload OK" or "Fail" depending to results.
For large images use WebService or POST - in this case you can use either base64 string or byte array.
See example here http://stackoverflow.com/questions/9889332/using-asmx-file-for-uploading-image-from-iphone
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BrianFordAuthor Commented:
Thanks
Managed to get this working and posting to a Web Service
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.