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.