JavaScript Post Request w/ Image
I'm afraid I might know the answer to this already. I'm hoping t开发者_如何学JAVAo present an HTML5 form offline in which a user can select an Image to upload. Once the user gets back on line the image will be uploaded. I can extract all the data from the file input, but is there a way to send the data via post to save the blob on the server?
I'm using jQuery and have a Rails backend (typical fileuploads are handled through CarrierWave).
You can create online
event and call submit()
on form that has your file image.
- http://www.javascript-coder.com/javascript-form/javascript-form-submit.phtml
- http://api.jquery.com/submit/
精彩评论