Can not click to open an uploaded files on sharepoint page

Nghiem Huy Hoang (DPS.MS3) 25 Reputation points
2023-11-14T02:27:51.73+00:00

I have uploaded a file to a SharePoint page, then I can't click to the link file to open it.

I provide to you some details:

  1. Our System was built on the SharePoint on-premises and I just added a new table and attach file on it.
  2. I added two file pdf on this and can't click to open. Then I inspected and realized that the "href" property was disappeared in <a> tag. You can see the mouse point to it[Image

](https://filestore.community.support.microsoft.com/api/images/5559f567-2cfe-48ae-adef-75d214dc0223?upload=true&fud_access=rhYinQu9k%2fQ7lDpdCsGkl3eusmFMeQelfHau4vFjY8lur4WJxfiEK7M3p4%2bs9FkBPy4gjPk1BpzKedTB0Zjh%2bzCRtDd6jCa%2fyokBDwISGOaLz2NNyurtbpNCCvuSAxDElHG%2fn6DLSEvx6me%2bhAe45MUdZ8PRVbr53bicicPzfm%2fBnsThuT8fBKXvvNrgVSQR%2fqVkz33GlMNaSeiHm%2bNMQZGSPMlp%2bL9AZaBd%2fN7b%2bAU%2btLhFRz5DI%2bgsh2FRc5IZDy1Ynf2jTWcQSbrqvaNt%2bPSE48pxnIbwg7APWkt4klyncp13TPrnsDPiDsyK4olQoqZXVyqUtGVghLxGe93IOm1AjiUCg5cz%2bpS9bWnJegs%3d"filestore.community.support.microsoft.com")

[Image

](https://filestore.community.support.microsoft.com/api/images/6bb9fe17-0fb0-46ed-a62e-394d9d656c54?upload=true&fud_access=rhYinQu9k%2fQ7lDpdCsGkl3eusmFMeQelfHau4vFjY8lur4WJxfiEK7M3p4%2bs9FkBPy4gjPk1BpzKedTB0Zjh%2bzCRtDd6jCa%2fyokBDwISGOaLz2NNyurtbpNCCvuSAxDElHG%2fn6DLSEvx6me%2bhAe45Nbqzv0ROOK%2bz2y0N5GebmW5Pb3RTEnWUbldOTiPoCUIObDvmvKBlSgyv8mfIPrbl4BfpNqVsdz%2btiVyqlbCTZcCXa7iHvbZyqRPWN%2fFL4nzEK%2faFxIs087r3juDMcWNYEYXLDIS8oxsSfoyFs772D6KEgd0q1rlV5%2byzOwxaCtJRZm%2bL37soGGp3Et2aphoLSY8cRS3zPEkVF0kg3xRaQs%3d"filestore.community.support.microsoft.com")3. I ran it in different browsers and got the same issue

How can I fix it?

thank you

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,339 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,679 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,970 questions
SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
583 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,609 questions
{count} votes

2 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 35,386 Reputation points Microsoft Vendor
    2023-11-20T06:10:33.1466667+00:00

    Hi @Nghiem Huy Hoang (DPS.MS3),

    1.You could check if the PDF is added to the web application’s trusted MIME Type List by running following command as an admin:

    Add-PSSnapin Microsoft.Sharepoint.Powershell 
    $webApplication = Get-SPWebApplication("web_application_url") $webApplication.AllowedInlineDownloadedMimeTypes
    

    84687-1.png

    If application/pdf is not present in the list, it means that PDF is not added to trusted MIME types of the web application. Let’s add application/pdf to the trusted MIME Types List by running the below command.

    $webApplication = Get-SPWebApplication("web_application_url") $webApplication.AllowedInlineDownloadedMimeTypes.Add("application/pdf") $webApplication.Update()
    
    1. Open SharePoint Central Administration >> Manage web applications >> select the web application url and click on General Settings Drop-down menu, select General Settings >>
      from General Settings page, change the browser handling option from ‘Strict’ to ‘Permissive’.
    2. Open Document Library >> Library Settings >> Advanced settings >> select the radio button "Open in the browser".

    84578-4.png

    1. Check all application pools are started

    84655-5.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.

    0 comments No comments

  2. Nghiem Huy Hoang (DPS.MS3) 25 Reputation points
    2023-11-22T08:21:38.05+00:00

    Hi @RaytheonXie_MSFT

    Sorry for reply late,

    I appreciate your help and your information you provide to me

    The PDF has been added to the web application’s trusted MIME Type because my user has uploaded another before. Do you need any details concern? Please let me know

    Have a nice day,

    Thank you


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.