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

Adding SVG in image types available for upload #6715

Closed
wants to merge 1 commit into from

Conversation

Zlitus
Copy link
Contributor

@Zlitus Zlitus commented Oct 5, 2021

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Oct 5, 2021

⚠️ No Changeset found

Latest commit: 2c47e7d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 5, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/keystonejs/keystone-next-docs/5r5sPYtoG38vLSoPNrHP4fpk5KW3
✅ Preview: Failed

@vercel vercel bot temporarily deployed to Preview October 5, 2021 12:21 Inactive
@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 5, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@bladey bladey changed the base branch from master to main October 8, 2021 02:58
@IdkMan2Usertive
Copy link

Why this feature is not being merged? We really need this feature to allow SVG uploads 😢.

@dcousens
Copy link
Member

dcousens commented Aug 4, 2022

A few concerns in respect to this and security, we need to reach consensus on what are safe defaults, and what are reasonable escape hatches.
I don't want Keystone to prescribe exactly what may be uploaded, but we aren't only an API platform.

For example, we might want to use https://github.com/cloudflare/svg-hush in this particular scenario.

@IdkMan2Usertive
Copy link

I have created a repository with some custom fields for Keystone.js, including vectorImage field which allows us to upload .svg files.

Have a look:
https://github.com/usertive/keystone-custom-fields

@Zlitus
Copy link
Contributor Author

Zlitus commented Aug 5, 2022

That's definitely very good and useful to treat SVG files and make sure they are safe, but in my case, KeystoneJS is the admin interface for my website and only me and my team which I trust do have access to it and can upload SVG files. I'm a little scared than the protections you will put to treat SVG could have some side-effect and break some SVG features I might want to use.

Maybe this should be an option than we can enable/disable by config?

@dcousens
Copy link
Member

dcousens commented Aug 22, 2022

That's an interesting consideration @Zlitus, and honestly that might mean we up with preferring this configuration being explicitly configurable by users with documentation warnings, instead of being specifically prescripted by us.

@yassinrais
Copy link

📌 For me, I wish there was a variable in the Keystone configuration that gave us the ability to enable/disable svg, that might be the best solution for now.

@dcousens dcousens self-assigned this Jul 13, 2023
@MartinDawson
Copy link

MartinDawson commented Jul 22, 2023

Is this ever going to be merged? 2 years in and still can't upload a basic thing like SVG's.

I too do not care about security as we only have authorized users...

@dcousens
Copy link
Member

dcousens commented Jul 23, 2023

@MartinDawson I think the conclusion is that we want to change this pull request to support the image types to be configurable by users, instead of prescribed by @keystone-6/*.
We are accepting of contributor pull requests, but as is, we don't want to merge this 💛

@dcousens dcousens closed this Jul 23, 2023
@luwangshell
Copy link

@dcousens, could you please share the issue/PR for "we want to change this pull request to support the image types to be configurable by users, instead of prescribed by @keystone-6/*"? Thank you.

@dcousens
Copy link
Member

See feature request #8913

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants