Error Message when clicking sharing video link in sharepoint

Copper Contributor
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.
14 Replies
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.
@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.

@barlage Hey there.  unfortunately not.  Sorry!

@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.

@Deleted , do you have any advice on how I could construct a hyperlink to an external website, so it bypasses the preview page?

@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.

@Deleted, thanks for your reply. I don't have an 'Expiration Date' column in my 'site pages' library. Can you please share an example of how I handle this and also include the format of how the expiration date should look in the url. Thanks again!
The [expiration date] parameter should be in UTC format and follow this format: yyyy-mm-ddThh:mm:ssZ. For example, 2023-06-01T12:00:00Z represents June 1, 2023, at 12:00:00 noon UTC.

here's an example of a full URL for a SharePoint file sharing link:


https://example.sharepoint.com/:v:/s/Marketing/Employees/CV12345.docx?e=2022-06-30T23%3A59%3A59Z&dow...

In this example:

- "example.sharepoint.com" is the domain for the SharePoint site
- "Marketing" is the name of the SharePoint site
- "Employees" is the name of the document library where the file is located
- "CV12345.docx" is the name of the file
- "2022-06-30T23%3A59%3A59Z" is the expiration date encoded in ISO 8601 format
- "&download=1" specifies that the file should be downloaded instead of previewed in the browser
- "&web=1" specifies that the link should be opened in the browser instead of the OneDrive app
- "&url=https://www.example.com" specifies a direct link to an external website

Note that the expiration date is URL-encoded to include the "T" separator and the "Z" time zone designator. The "&" character is also encoded as "&" in the URL.

@Deleted, this still isn't working for me and I need some clarification on a couple things.

 

  1. I included an expiration date in the URL I'm building, but I don't have an expiration date column in the library where I'm putting links. Do I need to create a column called 'ExpirationDate"? If yes, please include the exact syntax of what I need to name the column.

  2. In my picture below, this is how I am adding a link to my document library. I named my link 'google', but do you see how it adds the '.url' at the end of the name? It has 'google.url' in the details pane, so I'm using that.


CreateLink.jpg

properties.jpg

 

Will you please attempt to create a link to an external page in your site pages library and view that list in a list viewer web part and see if this solution you propose is working for you?

@barlage Please copy the link which I send in a text editor, and see the full URL to understand its syntax
https://example.sharepoint.com/:v:/s/Marketing/Employees/CV12345.docx?e=2022-06-30T23%3A59%3A59Z&dow...

@Deleted, I did copy your hyperlink and you did not answer my questions, so I am still stuck.

In your example, you have a link to a document (CV12345.docx). I am not linking to a document, so what would my link look like if I wanted to bypass the preview and go to an external site, like http://www.google.com.

And do I need to create an 'Expiration Date' column in my library and set the date the same as I put in the URL?
Hi, [expiration date] parameter in the url is an optional parameter, which you if specify that, then the shared link won't work after the specified date and time in iso format. You don't need to create any column for that, Your inital query was you need to provide the link for a video file right? instead of my sample document link you can specify the link to your video file.
Hi ShijurajJayaraj, the original posters question was for the video file preview. I also have an issue with the preview feature, but my issue is with preview of URL's in document library web parts.

Do you know if the solution you are proposing will also work for this scenario? I haven't figured it out yet, if there is a way.