Forum Discussion
Error Message when clicking sharing video link in sharepoint
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.
- DeletedMay 10, 2023
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=1Replace [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.
- barlageMay 10, 2023Brass ContributorDeleted, 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!
- DeletedMay 10, 2023The [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&download=1&web=1&url=https://www.example.com
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.