0

Suppose, i have uploaded 5 files and after some time due to network bandwidth issue it has thrown error.

So in that case, Is my all 5 files upload failed? Infact, I want to know paperclip internal process for multiple images upload.

Is that sequential order? Or all files at one single stream?

Could you please explain me? If any one have idea about it. Thanks!

Raju akula
  • 1,255
  • 1
  • 13
  • 18

1 Answers1

0

The file transportation mechanism for file uploads to the web server is the http multipart request. paperclip would not be used until the server finishes processing this request.

paperclip is not the transportation mechanism, it is a gem to (in small words) handle file data and storage whilst providing helpers to be used on the back-end of your rails application.

When uploading a file or multiple files in the same http request, if the http request fails the webserver halts the transaction, and that happens before any interaction with rails controllers.

An alternative for you would be to process the multiple file uploads separately on the front-end of your application, but that is a separated issue and I recommend you to do some research if you would like to go this path.

Community
  • 1
  • 1
The Fabio
  • 5,369
  • 1
  • 25
  • 55