Forum Discussion

monkeyclumps's avatar
monkeyclumps
Copper Contributor
Oct 19, 2021

Error Message when clicking sharing video link in sharepoint

i have a flow that automatically creates a sharing link for every file that is added to a sharepoint library. however, for video links that are uploaded/added to the sharepoint library, the sharing link first opens on a "error" message: Hmm looks like this file doesn't have a preview we can show you. there's an OPEN button on that error page that when clicked will lead to the video and play without problems. But my users will think that something is wrong because of the "this file doesn't have a preview we can show you" page. what do i need to do with regards to the sharing link (do i need to change something in the flow, perhaps?), so that when clicked it opens the video without the "error" message page? screenshot of error message below. Thanks in advance. apologies if this was supposed to be posted/asked on the power automate message board, but as the "error" shows up in sharepoint, i figured this was the place to start. i just can’t have this message pop up for users. using stream isn’t feasible as there are thousands of existing links that we just don’t have the manpower to upload there at the moment. but when. the flow/sharepoint creates the sharing link for existing videos this error message is the first think people see when clicking it. not ok. thanks.
  • monkeyclumps @BBarlage1 

    The error message you're seeing indicates that SharePoint is unable to generate a preview for the video file, which can happen if the file type or codec is not supported for preview in SharePoint. Unfortunately, there's not much you can do to change this behavior in SharePoint.

    One workaround you can consider is to modify the sharing link that's generated by your flow to bypass the preview page and go directly to the video. To do this, you can modify the URL of the sharing link to include the direct link to the video file instead of the preview page. Here's an example of how you can construct the URL:

    1. Get the direct link to the video file. You can do this by opening the video in SharePoint and then right-clicking on the video player and selecting "Copy video address" or "Copy video URL".

    2. Construct the sharing link URL. The sharing link URL has the following format:


    https://[domain].sharepoint.com/:v:/s/[site]/[document library]/[file name]?e=[expiration date]&download=1

    Replace [domain], [site], [document library], [file name], and [expiration date] with the appropriate values for your SharePoint site and video file.

    3. Modify the sharing link URL. Replace the URL to the preview page in the sharing link with the direct link to the video file. The modified URL should look something like this:


    https://[domain].sharepoint.com/:v:/s/[site]/[document library]/[file name]?e=[expiration date]&download=1&autoplay=1

    Note that the "&autoplay=1" parameter has been added to the end of the URL to automatically start playing the video.

    Once you've modified the sharing link URL, you can update your flow to use the modified link instead of the original link. This should bypass the preview page and go directly to the video.

    • barlage's avatar
      barlage
      Brass Contributor
      Deleted , do you have any advice on how I could construct a hyperlink to an external website, so it bypasses the preview page?
      • Deleted's avatar
        Deleted

        barlage 

        Yes, you can construct a hyperlink to an external website that bypasses the preview page in SharePoint by modifying the URL of the hyperlink. Here's an example of how you can construct the URL:

        1. Get the direct link to the external website. You can do this by navigating to the website in your web browser and copying the URL from the address bar.

        2. Construct the hyperlink URL. The hyperlink URL has the following format:


        https://[domain].sharepoint.com/:v:/s/[site]/[document library]/[file name]?e=[expiration date]&download=1

        Replace [domain], [site], [document library], [file name], and [expiration date] with the appropriate values for your SharePoint site and hyperlink file. Note that you can use any file name you want for the hyperlink file.

        3. Modify the hyperlink URL. Replace the URL to the preview page in the hyperlink URL with the direct link to the external website. The modified URL should look something like this:


        https://[domain].sharepoint.com/:v:/s/[site]/[document library]/[file name]?e=[expiration date]&download=1&web=1&url=[direct link to external website]

        Note that the "&web=1" parameter has been added to the end of the URL to indicate that this is a web page hyperlink, and the "&url=[direct link to external website]" parameter has been added to specify the direct link to the external website.

        Once you've modified the hyperlink URL, you can create a new hyperlink in SharePoint and use the modified URL instead of the original URL. This should bypass the preview page and go directly to the external website.

  • monkeyclumps's avatar
    monkeyclumps
    Copper Contributor
    simply put - when i click the sharing link created when the original link is uploaded to sharepoint (let's say it's a youtube video link for example) - i want it to open the video. NOT open a page with the Hmm...looks like this video doesn't have a preview error message. I just want to click the sharing link and be taken to the page where the video exists. not some interim page. thanks.
    • barlage's avatar
      barlage
      Brass Contributor
      monkeyclumps, Did you ever find a work around for this? I'm seeing the same issue when adding a URL link to a document library and viewing from a list web part on a page. I have a group of pages displayed in a list viewer web part and want to include some direct links, but it is awful for users to see that preview page when following a hyperlink.

Resources