-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[WEB-2393] chore-Uploading svg's are no more supported in the platform #5646
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
Changes from all commits
cc2640a
a52c0a3
a496947
244fb8a
8ae1063
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,7 +43,8 @@ export const WorkspaceImageUploadModal: React.FC<Props> = observer((props) => { | |
| const { getRootProps, getInputProps, isDragActive, fileRejections } = useDropzone({ | ||
| onDrop, | ||
| accept: { | ||
| "image/*": [".png", ".jpg", ".jpeg", ".webp"], | ||
| "image/jpeg": [], | ||
| "image/png": [], | ||
|
Comment on lines
+46
to
+47
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tip Codebase Verification Inconsistency found in WEBP support across components The change to restrict image uploads to JPEG and PNG formats in
To ensure consistency and prevent potential bugs:
Analysis chainVerify the impact of restricting image upload formats. The change to limit the
Run the following script to verify references to other image formats in the codebase: Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify references to image formats other than JPEG and PNG.
# Test: Search for references to SVG. Expect: No results.
rg --type typescript $'image/svg'
# Test: Search for references to WEBP. Expect: No results.
rg --type typescript $'image/webp'
Length of output: 136 Script: #!/bin/bash
# Description: Verify references to image formats other than JPEG and PNG in TypeScript files.
# Search for references to SVG and WEBP in .ts and .tsx files
rg -i -C 2 -g '*.{ts,tsx}' 'image/(svg|webp)'
Length of output: 1334 |
||
| }, | ||
| maxSize: config?.file_size_limit ?? MAX_FILE_SIZE, | ||
| multiple: false, | ||
|
|
@@ -162,7 +163,7 @@ export const WorkspaceImageUploadModal: React.FC<Props> = observer((props) => { | |
| )} | ||
| </div> | ||
| </div> | ||
| <p className="my-4 text-sm text-custom-text-200">File formats supported- .jpeg, .jpg, .png, .webp</p> | ||
| <p className="my-4 text-sm text-custom-text-200">File formats supported- .jpeg, .jpg, .png</p> | ||
| <div className="flex items-center justify-between"> | ||
| {handleRemove && ( | ||
| <Button variant="danger" size="sm" onClick={handleRemove} disabled={!value}> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.