0

I've been trying to use the webimage helper in webmatrix to upload an image using ajax but its not clear to me how i can pass data to the webimage.getImageRequest("Image") method from the ajax post.This helper seems to retrieve its file upload data from the browser when the page form is posted.For me, i dont want to refresh the form...I just want ajax to handle process

Ifeanyi Chukwu
  • 3,187
  • 3
  • 28
  • 32

1 Answers1

0

The issue here isn't the WebHelper - uploaded files are not posted with ajax requests:

How can I upload files asynchronously?

So you're probably getting a file name, but no content. That thread above shows a few work arounds that should work fine with the WebHelper. I've also had pretty good luck with uploadify:

http://www.uploadify.com/

Happy Coding!

Community
  • 1
  • 1
Justin Beckwith
  • 7,686
  • 1
  • 33
  • 55
  • everyone is talking about the client-side handling.I present resulted to using valum's fileuploader.js. the plugin successfully posts to my server handler but webimage.getImageRequest() method of the webmatrix helper returns photo result to null.From my research, webimage.getImageRequest() works and fetches its data from the browser when a form-post request is made.I'm stuck on that line.did you get my point?thanks alot. – Ifeanyi Chukwu May 07 '12 at 12:30