CON-1534 - Inconsistent path case casing issues when using Azure blob storage for file uploads.

Created by Jason Thomas 04 May 2018, 17:32:08 Updated by Robert Copilau 04 Jun 2018, 10:30:33

Tags: Gold partner

Relates to: CON-1177

We have a form with an upload field that stores an image to Azure blob storage via the UmbracoFileSystemProviders.Azure plugin. We are seeing an issue with case sensitivity of the path in how uploads are saved to the file system. If you view a form submission entry the path to the individual uploaded image in the entry is lowercase (i.e. media/forms/uploads/form_f5ad1ac8-9352-4256-b428-67dace227994/...) but if you try to download the uploaded images the path is mixed case i.e. media/forms/uploads/Form_f5ad1ac8-9352-4256-b428-67dace227994/...). Note the "f" in "form", "form_" vs. "Form_". If we rename the form folder to a lowercase "f" then the uploaded image in the individual entries displays but we are not able to download any of the images. if you rename to an uppercase "F" then we can download but the images are broken in the individual entries.

We would expect the consistent use of case in file paths. Umbraco created views using Angular should force either camel case or Pascal case for variables. C# code should follow the same standard.

Version: Umbraco 7.10.2 / Forms 7.0.1

8 Attachments

Download UmbracoForms.Files.7.0.4-alpha001.zip

Download UmbracoForms.7.0.4-alpha001.nupkg

Download UmbracoForms.Core.7.0.4-alpha001.nupkg

Comments

Sebastiaan Janssen 14 May 2018, 09:29:45

@jt3432 While I couldn't fully replicate the problem, I did notice there were some inconsistencies in our code. Please try out the attached updated version to see if this resolves the problem for you.


Sebastiaan Janssen 14 May 2018, 09:35:35

PR: https://github.com/umbraco/Forms/pull/187


Jason Thomas 14 May 2018, 21:05:46

@sebastiaan, are you storing submitted uploads in an Azure blob? That is at the root of the issue. I tried the new code and got the exact same issue (I did clear cache). Uploaded files are being saved to a folder that starts with a capital "F" which breaks the path to the image in the individual records for the uploaded files. If I merge all the uploaded files to the folder that starts with the lowercase "f" the individual entries display the uploaded file but then the option to download is missing because it is looking for a folder that begins with a capital "F".


Sebastiaan Janssen 15 May 2018, 08:54:23

Yes, I was using blob storage for this.

I had the same problem with the missing download button but after fixing it in the version above, this was working again.

Maybe your problem is related to the fact that you have existing uploads stored in folders that start with a capital?

If that is not the case, are you sure you replaced the dll files (that's the only thing that contains changes)?


David Dimmer 15 May 2018, 15:15:51

I have asked our team yesterday to test; we hope to confirm this morning. Thank you for the fast turn around.


Jason Thomas 15 May 2018, 16:10:59

Yes, replaced the DLL and removed the folder that started with the capital "F" and had no download available after rebuilding and clearing the cache. I will test again and report back.


Jason Thomas 15 May 2018, 17:18:15

I applied this to our production site and it did work. Must have an issue with how I updated the DLL in my dev environment.


Robert Copilau 04 Jun 2018, 10:30:29

Tested and I am able to save the uploaded files. Merging.


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty:

Category:

Backwards Compatible: False

Fix Submitted:

Affected versions: 7.0.0, 7.0.1, 7.0.2

Due in version: 7.0.4

Sprint: Sprint 86

Story Points: 1

Cycle: 10