JavaScript Post Request w/ Image

2019-07-25 00:39发布

I'm afraid I might know the answer to this already. I'm hoping to 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).

1条回答
Juvenile、少年°
2楼-- · 2019-07-25 01:00

You can create online event and call submit() on form that has your file image.

查看更多
登录 后发表回答