I initially implemented the image upload using Carrierwave. However, carrierwave doesn't have a proper integration for multiple uploads.
The current upload code will result in a race condition when you try to upload two files at once which results in only one of the files being saved to the database. (Because the whole images array is set whenever the database is modified instead of just appending to the image array).
One solution is to use Shrine which has an explicit integration with Uppy. The other option might be to only allow one image to be uploaded at a time, but that would be a big usability hit.
I initially implemented the image upload using Carrierwave. However, carrierwave doesn't have a proper integration for multiple uploads.
The current upload code will result in a race condition when you try to upload two files at once which results in only one of the files being saved to the database. (Because the whole images array is set whenever the database is modified instead of just appending to the image array).
One solution is to use Shrine which has an explicit integration with Uppy. The other option might be to only allow one image to be uploaded at a time, but that would be a big usability hit.