1

To test support of special characters in document names we created test files and uploaded them to document library:

enter image description here

When we try to open such file, an error message appears:

enter image description here

Of course, the file is valid JPG, which can be viewed very fine in the same SharePoint instance under another name. Preview breaks only when the file is renamed.

Is it a bug of SharePoint? What characters are allowed in file names to enable preview?

Any advice will be highly appreciated. Thank you.

  • What is even more ridiculous, even when I rename the file in SharePoint and remove all special characters from the name, it still fails to render! Probably, corruption occurs already at the moment of uploading with improper name and then persists internally. – Boris Zinchenko Apr 5 '18 at 9:17
  • I ve never seen that single quotes were mentioned anywhere as prohibited. It is very important aspect for us because client has a lot of files with single quotes in names and wants to upload them. Will be tedious to rename all. – Boris Zinchenko Apr 5 '18 at 9:39
  • yes single quote is not prohibited you can use it in the file name – A.Saéed Apr 5 '18 at 10:11
2

I did the test just now but i am able to see the preview.I uploaded into a document library. here are the results. enter image description here

enter image description here

But what i am thinking, may be your jpg is corrupted, can you upload a new jpg without any spl character and see if that works. In which list / library you uploaded the file?

  • 1
    You are correct. I ve downloaded this file locally and it appears as zero size. I ve uploaded also new file with such name to document library and have no problems viewing it online. File name as such IS compliant with SharePoint conventions. I m trying to reproduce scenario where content from the file disappeared. Maybe it was failing upload. I will report further results of my investigation. It was easy to miss because SharePoint does not standard show file sizes. – Boris Zinchenko Apr 5 '18 at 12:53
  • 1
    yes,Thats what i was thinking, may be its file itself causing the issue otherwise i am able to see it on my tenant. – Waqas Sarwar MVP Apr 5 '18 at 13:08
  • Yes. It is corrupted file. I m investigating how and where it corrupted. I will try to reproduce exact scenario and report further results when available. – Boris Zinchenko Apr 5 '18 at 13:34
0

If a file or folder you’re trying to upload to contains any of the characters listed below, it may prevent files from being previewed. Rename the file or folder to remove these characters.

Characters that aren't allowed in file and folder names in SharePoint Online

" * : < > ? / \ |

Characters that aren't allowed in file and folder names in SharePoint Server 2013

~ " # % & * : < > ? / \ { | }.


Invalid file names and file types in OneDrive, OneDrive for Business, and SharePoint

  • Thank you for a hint. You might notice that provided name does NOT contain any prohibited characters. Repeated single quote looks similar to prohibited double quote, but it is just repeated single quote. However, it does not work. – Boris Zinchenko Apr 5 '18 at 9:11
  • What is even more ridiculous, even when I rename the file in SharePoint and remove all special characters from the name, it still fails to render! Probably, corruption occurs already at the moment of uploading with improper name and then persists internally. – Boris Zinchenko Apr 5 '18 at 9:16
  • 1
    @BorisZinchenko try to upload the file again , before you upload make sure the file is not corrupted and avoid using the above characters include the single & double quotes – A.Saéed Apr 5 '18 at 9:26
  • I followed your hint and uploaded same file with normal name: "Test1.jpg". It opens for preview fine. Even more interestingly, if I rename it to "bad" name as above inside SharePoint, it still opens fine under this new name! It seems that corruption happens exactly during upload. Very strange issue! – Boris Zinchenko Apr 5 '18 at 9:35
  • @BorisZinchenko avoid the mentioned characters in the answer and it should works fine :) – A.Saéed Apr 5 '18 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.