Forum Discussion

Marcus121's avatar
Marcus121
Copper Contributor
Jan 22, 2022

Filenames truncated during Forms attachment upload

I've been using a MS Form to capture docs from team members (via the upload attachment question field), and recently noticed the filenames are being truncated at around 65 characters (+/-). I did a search on restrictions and found that the full path of a filenames is limited to 400 characters. I edited the file folder names where my Form attachments are being stored so they were shorter, but the truncating is still happening. Any ideas on why shortening the overall file path didn't have the desired effect?

  • BukiMainLong's avatar
    BukiMainLong
    Copper Contributor

    Marcus121 - This is still an unresolved question. I started experiencing the same problem when uploading files via a Microsoft Form to SharePoint. This article states that with regard to SharePoint, the file path length starts at the word 'sites' in the path name. The default location for a new form upload submission is buried sort of deep IMO:

    "sites/site-name/Shared%20Documents/Apps/Microsoft%20Forms/SubFileUpload/Question%201/"

     

    This equates to 85 characters in this example, well under the 400 character limit. Even with a really long filename, 315 characters should be fine.

     

    Another tidbit to consider, Microsoft Forms, by default, appends an underscore and the users' name to the end of the file on upload. I thought this might be pushing the path length over the limit forcing the truncation. Again though, with 315 characters, this should be more than enough.

     

    I dug in to my flow outputs and it seems that the filename is actually being truncated before the user name is being appended. Purely a guess at a glance from me on this. Please correct me if I'm mistaken. Don't want to spread misinformation. Just trying to find a solution as my clients are frustrated by this behavior.

    • Marcus121's avatar
      Marcus121
      Copper Contributor

      Thanks BukiMainLong - I was able to develop a work around to this issue using a Power Automate flow that renames the attachment files to whatever I want. It took a little while to figure out, and might not be realistic for the average Forms user, but it works.

      • BukiMainLong's avatar
        BukiMainLong
        Copper Contributor

        Marcus121 Yep, that has been my workaround as well. My clients only want the original filename. The problem is that the file upload is not capturing the full name of the original file. I suppose I could add a hidden field to capture the original name and then rename with that value via flow.

      • BukiMainLong's avatar
        BukiMainLong
        Copper Contributor

        Moritz__ - Unfortunately, the behavior seems to remain the same. I currently do not have another solution except for what is mentioned here previously/above.

  • Prasouk_Jain's avatar
    Prasouk_Jain
    Copper Contributor

    Pernille-Eskebo why do you create these problems. File name does not have to be truncated unnecessarily. Have standard limits for everything to avoid problems for users 

Resources