BUG w/ Files: Filenames containing " icon" filled with garbage upon uploading

Patrick_McCabe
Shopify Partner
25 1 20

Normally, files uploaded to Shopify will mostly keep the filename the same as long as an existing file doesn't share the same filename. Various characters will be swapped with a space, multiple spaces in a row will be condensed into a single space "   " to " ", and finally spaces will be swapped for underscores.

Everything else stays the same. I have run into what I am certain is a bug.

Attempting to upload a file whose filename contains a space followed by the word "icon", or an underscore and the word "icon" will result in a filename filled with garbage. 
It doesn't matter if the file you are uploading has a unique filename. 
So files with these names; "search icon" or "search_icon" will result in a filename like this; "search_icon_4bbc8f76-df76-4e64-bbd9-5a18bd78603a"
Strangely, uploading a file with "search-icon" as the name is fine. Everything uploads as it should. So swapping underscores or spaces with hyphens bypasses the glitch.

EDIT: While I was writing this, I did another test. Uploading a .txt file with the filename "search_icon.txt" is fine. Nothing goes wrong. HOWEVER; uploading a .SVG file with the same title results in garbage being added to the file name. So some filetypes are treated differently.

You can see two screenshots below of my testing on this issue.
Shopify Hates _Icon.pngshopify why_icon.png

I have run into a lot of strange undocumented nonsense with Shopify's file storage, but this is one of the more baffling ones.

Can anyone else confirm that they also have this issue?

Reply 1 (1)

StephensWorld
Shopify Expert
1117 120 284

Hey Patrick,

 

I just tested on my store and can confirm that the same thing is happening. 

 

svg files with icon txt in name.png

 

Looks like the solution here is to just not use the word "icon" in the file name. I switched the name from "bubblegum_icon" to "bubblegum_pic" and it works as expected. 

 

I agree though, it's very strange. 

★ Did my post help? If yes, then please like and accept solution. ★

Hire me for your Shopify project @ stephens.world | support@stephensworld.ca