You are viewing limited content. For full access, please sign in.

Question

Question

Forms - Upload Field has case sensitivity in file extension only on new forms designer

asked on October 28, 2022

An upload field (with file type restrictions) that works without issue on the old forms designer, when added to the new forms designer rejects uploads if the case of any character in the file extension does not match exactly the case specified.

Case sensitivity has never been an issue in reference to file extensions. There should not be any case sensitivity here.

So for each extension you have to enter 2^Characters to cover all possibilities

IE: pdf, Pdf, PDf, PDF, pdF, pDF, pDf, PdF

Why do external submitters use different cases in their extensions? I don't know but likely because it has never mattered in any version of Windows.

1 0

Replies

replied on November 4, 2022

It is a bug for new form designer, we will look into fix it. 

2 0
replied on October 28, 2022 Show version history

I just gave it a try (version 11.0.2201.20436 testing via Google Chrome).

When I set the field configuration to "pdf" I was able to attach a file regardless of whether I set it's extension to pdf, PDF, or Pdf.  However, when I changed the configuration to either "PDF" or "Pdf" if failed no matter which way I listed the extension on the actual file.

Unless I'm mistaken, in both the classic designer and the new designer, Forms is just leveraging the standard HTML functionality for <input type="file"> with the accept parameter for file types and not something uniquely designed.  So you'd think it would behave like any other file input on any other website.  However, I think they might be doing some sort of custom validation on the field, and that is where I think it is failing.

For one thing, Forms is tweaking the values you are putting for the file types in order to match how the html expects it to be listed.  For example, if you want to accept txt, docx, and pdf you would list them as "txt,dox,pdf" in Forms, but on the browser it'll end up showing as ".txt,.docx,.pdf" which is how the field should look in HTML.  If you try listing them as ".txt,.docx,.pdf" in Forms then they end up having extra periods in the browser ("..txt,..docx,..pdf") and then they don't work.

In a quick test with a basic HTML file (I just made it say the script below) it wasn't case sensitive.  

<html><body><input type="file" accept=".PDF"></body></html>

 

So, I believe that despite the fact that the field in HTML itself shouldn't be case sensitive, it does seem like the new designer in forms doesn't like it unless you list the values in lower case, and I suspect it is tied more to the field validation that to the actual field itself.

EDIT TO ADD: I did notice on the classic designer that when it added the periods to the allowed extensions, it also made them lowercase (changing "txt,docx,PDF" to ".txt,.docx,.pdf").  It still shouldn't matter to the browser, but there is that difference.  I still think it's some sort of validation script of the new designer, and not the actual file input field, that would be causing any problems.

1 0
replied on October 28, 2022 Show version history

Thanks for testing, it is something specific to the new designer since the old designer does not reject the document.

You can upload all upper case to an all lower case defined allowed extension? That is odd since it does not work for me. But either way the new designer is case sensitive and extensions should not be case sensitive since the default application only looks at the characters used and not the case.

You can't set a default application for PDF vs pdf for example.

0 0
replied on October 28, 2022

Yeah, if I define it as lower case, I can attach the file regardless of the case on the actual file, but if I define it as upper case or mixed case, nothing works.

You're right that it should be case-insensitive.  Everything I can find online about the file input element in HTML is very clear that it is case insensitive, so something that Forms is doing on top of the actual field, is not working right.

0 0
replied on January 9, 2023

This bug has been fixed with Forms 11 Update 3.

You can see other changes of Forms 11 Update 3 from  https://support.laserfiche.com/kb/1014413/list-of-changes-for-laserfiche-forms-11-update-3 and get Forms 11 Update 3 from Laserfiche 11 package  https://support.laserfiche.com/kb/1014263/software-versions-and-fixes-included-in-the-laserfiche-11-download-package

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.