iFixit / charge

A tool to upload static images for the site
3 stars 2 forks source link

Move existence check to after prepare #14

Closed djmetzle closed 5 years ago

djmetzle commented 5 years ago

If we're converting an uploaded file to JPEG, we change the upload destination by munging the file extension. However, we were checking the destination before changing the extension. This is a bug.

Move the S3 existence check to after prepare_source_file, which munges the file extension. This ensures that we're checking the correct intended upload destination.

CC @davidrans

Closes: #13

davidrans commented 5 years ago

CR ☕️

jarstelfox commented 5 years ago

CR 🌵

jacksonmcdaniel commented 5 years ago

@djmetzle Does this need QA?

djmetzle commented 5 years ago

@jacksonmcdaniel Nah.