Filenames truncated during Forms attachment upload

%3CLINGO-SUB%20id%3D%22lingo-sub-3068953%22%20slang%3D%22en-US%22%3EFilenames%20truncated%20during%20Forms%20attachment%20upload%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3068953%22%20slang%3D%22en-US%22%3E%3CP%3EI've%20been%20using%20a%20MS%20Form%20to%20capture%20docs%20from%20team%20members%20(via%20the%20upload%20attachment%20question%20field)%2C%20and%20recently%20noticed%20the%20filenames%20are%20being%20truncated%20at%20around%2065%20characters%20(%2B%2F-).%20I%20did%20a%20search%20on%20restrictions%20and%20found%20that%20the%20full%20path%20of%20a%20filenames%20is%20limited%20to%20400%20characters.%20I%20edited%20the%20file%20folder%20names%20where%20my%20Form%20attachments%20are%20being%20stored%20so%20they%20were%20shorter%2C%20but%20the%20truncating%20is%20still%20happening.%20Any%20ideas%20on%20why%20shortening%20the%20overall%20file%20path%20didn't%20have%20the%20desired%20effect%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3068953%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3393729%22%20slang%3D%22en-US%22%3ERe%3A%20Filenames%20truncated%20during%20Forms%20attachment%20upload%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3393729%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1282346%22%20target%3D%22_blank%22%3E%40Marcus121%3C%2FA%3E%26nbsp%3B-%20This%20is%20still%20an%20unresolved%20question.%20I%20started%20experiencing%20the%20same%20problem%20when%20uploading%20files%20via%20a%20Microsoft%20Form%20to%20SharePoint.%20%3CA%20title%3D%22Restrictions%20and%20limitations%20in%20OneDrive%20and%20SharePoint%22%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Frestrictions-and-limitations-in-onedrive-and-sharepoint-64883a5d-228e-48f5-b3d2-eb39e07630fa%23%3A~%3Atext%3DFile%2520name%2520and%2520path%2520lengths%2C-Applies%2520to%253A%26amp%3Btext%3DThe%2520entire%2520decoded%2520file%2520path%2Cand%2520file%2520name%2520after%2520decoding.%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EThis%20article%3C%2FA%3E%20states%20that%20with%20regard%20to%20SharePoint%2C%20the%20file%20path%20length%20starts%20at%20the%20word%20'sites'%20in%20the%20path%20name.%20The%20default%20location%20for%20a%20new%20form%20upload%20submission%20is%20buried%20sort%20of%20deep%20IMO%3A%3C%2FP%3E%3CP%3E%22sites%2Fsite-name%2FShared%2520Documents%2FApps%2FMicrosoft%2520Forms%2FSubFileUpload%2FQuestion%25201%2F%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20equates%20to%2085%20characters%20in%20this%20example%2C%20well%20under%20the%20400%20character%20limit.%20Even%20with%20a%20really%20long%20filename%2C%20315%20characters%20should%20be%20fine.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnother%20tidbit%20to%20consider%2C%20Microsoft%20Forms%2C%20by%20default%2C%20appends%20an%20underscore%20and%20the%20users'%20name%20to%20the%20end%20of%20the%20file%20on%20upload.%20I%20thought%20this%20might%20be%20pushing%20the%20path%20length%20over%20the%20limit%20forcing%20the%20truncation.%20Again%20though%2C%20with%20315%20characters%2C%20this%20should%20be%20more%20than%20enough.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20dug%20in%20to%20my%20flow%20outputs%20and%20it%20seems%20that%20the%20filename%20is%20actually%20being%20truncated%20before%20the%20user%20name%20is%20being%20appended.%20Purely%20a%20guess%20at%20a%20glance%20from%20me%20on%20this.%20Please%20correct%20me%20if%20I'm%20mistaken.%20Don't%20want%20to%20spread%20misinformation.%20Just%20trying%20to%20find%20a%20solution%20as%20my%20clients%20are%20frustrated%20by%20this%20behavior.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

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?

3 Replies

@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.

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.

@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.