Mar 27 2020 11:24 AM
Hello Community,
I'm doing a big migration of a personnalized SharePoint 2010 Web Application. I managed to migrated to 2013 and 2016 without any issues. But my final step from 2016 to 2019 make some of my PDF files to not be able to be view or download. The files seem to be corrupted. In the browser I get a "This PDF document might not be displayed correctly" and when I download the file to open it locally I got an error message telling me that the file may be corrupted or not the good version for my viewer. I have the same behavior in IE, Chrome, Firefox ... so I guess that the files are really corrupted in the DB.
I have access to a fonctionnal 2016 DB, so community .... any idea for me??
Thank you all and have a nice day :)
Mar 29 2020 05:15 PM
Did a re-upgrade produce the same results?
I'm assuming prior to upgrading to 2016, you did an Upgrade-SPSite as well as switched to a claims provider (if not using claims in 2010)?
Have you tried downloading the file from SharePoint using PoSh on the server?
$web = Get-SPWeb https://webApp/sites/siteCollection
$file = $web.GetFile('libraryName/myFile.pdf')
$bytes = $file.OpenBinary()
$fs = New-Object System.IO.FileStream('C:\myFile.pdf', 'Create')
$bw = New-Object System.IO.BinaryWriter($fs)
$bw.write($bytes)
$bw.Close()
Mar 30 2020 04:45 AM - edited Mar 30 2020 04:46 AM
@Trevor SewardThank you for the reply!
I'm effectively in claims based since 2010. I tried your little code on my 2019 server and it work!! But I'm not sure what to do next?
Again, thank you for your help :)
Mar 30 2020 07:58 AM
Mar 30 2020 08:21 AM
No, I'm not using any network filtering, I'm in a localhost setup, SharePoint, SQL, etc., all on the same server. I'm figure after your little test that I can go in the Document library and manually download the files, but I can't use the Title link. I have the same issue in all browser.
I'm working on a work around ... Creating a new library, moving all the stuff there and renaming it as the initial library.
Mar 30 2020 10:03 AM
I'm realizing that the only files that is not working properly all have accent like "è, é, à" and all that is working dont have those.
BTW, I managed to copy all files but I couldn't delete the library, it's Documents, a system library. Maybe there is a yay but anyway the new files in the new library have the same issue.
So now I'm searching why I have accent issue.
Mar 30 2020 10:28 AM
SolutionFound it!!!
I just needed to enable ''Allow high-bit characters'' in my IIS Web Site in the Request Filtering option.
Source : StackOverflow
Thanks a lot for your help, you help me looking at a different place and it unstuck me.
Mar 30 2020 10:28 AM
SolutionFound it!!!
I just needed to enable ''Allow high-bit characters'' in my IIS Web Site in the Request Filtering option.
Source : StackOverflow
Thanks a lot for your help, you help me looking at a different place and it unstuck me.