DaveButland / sans-website

Sans-Caffeine Website
MIT License
0 stars 0 forks source link

Image upload doesn't wait on files uploaded #1

Closed DaveButland closed 5 years ago

DaveButland commented 5 years ago

The image upload process doesn't wait until the file is uploaded because the promise is set on the creation of the image record which then returns a signed url for uploading the image to the S3 bucket directly. The code should really wait on all the promises for creating the image record before triggering off all the uploads to the signed URLs.

DaveButland commented 5 years ago

Simple change to make the creation of the image wait on the upload of the image before returning a success response. Better error handling is still required though