Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getPreview.ashx SVG support? #3700

Closed
3 of 4 tasks
cslecours opened this issue Mar 28, 2019 · 4 comments
Closed
3 of 4 tasks

getPreview.ashx SVG support? #3700

cslecours opened this issue Mar 28, 2019 · 4 comments
Labels
area:other Category: unknown (does not fit any other category) status:answered Answer to a question. type:question Question... if answered, will be tagged as such.

Comments

@cslecours
Copy link
Contributor

cslecours commented Mar 28, 2019

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Applies to : SharePoint Online

Expected or Desired Behavior

I should be able to get a svg preview using getPreview.ashx.

Observed Behavior

In a site collection, I have a svg image in a document library.
I want to be able to see this image when I have a limited access.
I use the /layouts/15/getPreview.ashx handler to do that.

When I get /layouts/15/getPreview.ashx?action=supportedTypes. I see that svg is supported, but when I try to get the svg image via this handler, I have a http 501 response with no body.

Steps to Reproduce

Upload a svg image to a document library (to make things easier, ensure that the site collection url has no weird characters such as spaces or accents).

myImageUrl = Complete image url beginning with https://{tenantName}.sharepoint.com
MYIMAGEURLENCODED = encodeURIComponent(myImageUrl);

GET /layouts/15/getPreview.ashx?path=MYIMAGEURLENCODED

Any help would be appreciated !
Thanks,
Charles

@msft-github-bot
Copy link
Collaborator

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@msft-github-bot msft-github-bot added the Needs: Triage 🔍 Awaiting categorization and initial review. label Mar 28, 2019
@cslecours cslecours changed the title getPreview.ashx SVG support getPreview.ashx SVG support? Mar 28, 2019
@andrewconnell
Copy link
Collaborator

@StfBauer have you tried to get a preview of user uploaded SVG's?

@andrewconnell andrewconnell added type:question Question... if answered, will be tagged as such. area:other Category: unknown (does not fit any other category) and removed Needs: Triage 🔍 Awaiting categorization and initial review. labels Mar 29, 2019
@StfBauer
Copy link
Collaborator

getPreview.ashx service is for binary files only.

It won't make sense to use it for Scalable Vector Graphics which is only a text file and rendered by the browsers just like HTML.

The images preview, in the end, would be potentially bigger than the content of the actual SVG file.

I did a short test and when the service is used it only downloads a blank file. I can confirm that this is not supported and doesn't need to support from my point of view.

I haven't tested the action=supportedTypes but it is more a bug that it is listed there as a supported type.

@andrewconnell andrewconnell added the status:answered Answer to a question. label Apr 12, 2019
@msft-github-bot
Copy link
Collaborator

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

@SharePoint SharePoint locked as resolved and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:other Category: unknown (does not fit any other category) status:answered Answer to a question. type:question Question... if answered, will be tagged as such.
Projects
None yet
Development

No branches or pull requests

4 participants