Currently, App logo files uploaded by users are getting saved in the top level of the "media" directory in S3. Also, these files are named after whatever the user uploaded, with an added ".png" extension.
This is problematic because it makes the S3 bucket file and folder organization very hard to understand and manage. Also, it's a bit weird that we automatically add the ".png" extension. It's not clear what will happen if the file is not actually in png format.
Let's make our infrastructure more rationale as follows:
- When a user uploads a logo file for a given version of an App, the logo file will be stored in the version subdirectory for that App.
- Also, the logo file will be named after the App Bundle-Symbolic name and version.
User uploads a logo file named "goofy_Weird_strange_and_ bizarre name for a file.JPG" for an App with Bundle-SymbolicName "goofy-app" and Bundle-Version "0.0.1"
The App Store will allow this file to be uploaded but will re-name it goofy-app-0.0.1.jpg.
*Note*: We transform the file extension to lower-case letters and we keep whatever file extension the user assigned, assuming the file format is not actually getting changed to "png" in our code. (PNG is a different file format from JPEG, which is lossy and is typically used only for photographs and not computer-generated graphic art such as logo images.)