I'm developing a REST API using Jersey and I need to add large file uploading via REST API. I tried with small files and its working. However, the API will be used to upload large files which will have size of 2GB - 5GB, since it will be used to upload videos.
I have checked on the stack overflow and other forums to find similar questions and its been suggest to use streaming to upload large files. I'm not sure how to write the REST API to accept such large files without timeout. I want to use both REST API and also normal file upload (via html file upload) to accept large files. I want to know how I can break files into small chunks and upload to the REST API and store the files in the server.
Are there any libraries in Javascript and Java to make this task easy?
I'm developing a REST API using Jersey and I need to add large file uploading via REST API. I tried with small files and its working. However, the API will be used to upload large files which will have size of 2GB - 5GB, since it will be used to upload videos.
I have checked on the stack overflow and other forums to find similar questions and its been suggest to use streaming to upload large files. I'm not sure how to write the REST API to accept such large files without timeout. I want to use both REST API and also normal file upload (via html file upload) to accept large files. I want to know how I can break files into small chunks and upload to the REST API and store the files in the server.
Are there any libraries in Javascript and Java to make this task easy?
Share Improve this question asked Jun 4, 2014 at 7:06 User 99xUser 99x 1,0211 gold badge14 silver badges39 bronze badges 1- I checked that question and its not give any details on how to upload large file with the html forms to the rest api. – User 99x Commented Jun 4, 2014 at 7:14
1 Answer
Reset to default 2Please take a look to this response stackoverflow : uploading large files with jersey (see the code of sikrip) that is similar to your problem. And here is an example JS client code for uploading large file .
I've been testing this JS code and that's working.
Enjoy!