question

HollyAnderson-7381 avatar image
0 Votes"
HollyAnderson-7381 asked ElsieLu-MSFT commented

Attachments with restricted characters can be added to list items in SharePoint 2019 but cannot be saved

Hello,

I'm running into some odd behavior with list item attachments in SharePoint 2019. If I add an attachment with % or # in the name (e.g. t#%t.txt) to a list item, the file is either removed on save (classic mode) or inaccessible after save (modern mode). In classic mode, the list item is saved without the attachment and an error is reported about the attachment containing illegal characters. In modern mode, the attachment appears to be added to the item when it is saved, but when I click the link and a new browser tab opens, I see "404 NOT FOUND" instead of the file contents.

Any idea why this is happening? In SharePoint 2013 and 2016, I would get an error message when trying to add attachments with restricted characters to a list item, so I never got to the point where they could be saved on an item.

Thanks,
Holly

office-sharepoint-server-administrationoffice-sharepoint-server-development
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @HollyAnderson-7381 ,

I will do some tests and investigations in different versions and reply you as soon as possible.

Thanks,
Elsie Lu

0 Votes 0 ·
ElsieLu-MSFT avatar image
0 Votes"
ElsieLu-MSFT answered ElsieLu-MSFT edited

Hi @HollyAnderson-7381 ,

Per my test, I would suggest you try to stop using similar special characters. Tests in each version show that SP does not support similar special characters.

However, in my SP2019 environment, I found that if I add attachments with similar character names in the modern experience, and then I can see the content when I open it in the classic experience, you could have a look:
86163-test.gif

My test results:
SP 2013 Build Number 15.0.4617.1000:
86117-2013.jpg
============
SP 2016 Build Number 16.0.4327.1000:
86109-2016.jpg
================
SP 2019 Build Numer 16.0.10711.37301:
Modern:
86118-2019.jpg
Classic:
86128-spo-classic.gif
===============
SPO:
86085-spo.jpg


If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


test.gif (393.5 KiB)
2013.jpg (23.3 KiB)
2016.jpg (19.4 KiB)
2019.jpg (10.2 KiB)
spo-classic.gif (599.2 KiB)
spo.jpg (12.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

HollyAnderson-7381 avatar image
0 Votes"
HollyAnderson-7381 answered ElsieLu-MSFT commented

@ElsieLu-MSFT,

I understand special characters may not be supported, but the way in which they are handled in SharePoint 2019 is inconsistent with previous versions. First, attachments which are named with special characters can be added to items in classic mode, which is not true in SharePoint 2013 or 2016. An error is then reported when the item is saved, but the item is saved successfully without the attachment. Second, if such an attachment is added in modern mode, the item can be saved with the attachment, which then cannot be viewed. Though, as you mentioned, it can be viewed by switching back to classic mode. This seems to suggest that attachments with names containing special characters can in fact be saved properly in SharePoint, so I'm not even sure why this restriction exists.

This behavior seems like a bug, particularly the part about not being able to view such attachments in modern mode. Is it possible to report this as an issue to the appropriate team?

Thanks,
Holly

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @HollyAnderson-7381 ,

Thank you for the reply and efforts on this case. We will do more testing and research, any update will be post here. :)

Thanks,
Elsie Lu

0 Votes 0 ·