on resource creation : double check if contentType return same extension as file extension
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 153
- Forks
- 46
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 7
Description
see https://github.com/solid/folder-pane/issues/5
on resource creation solid-ui in https://github.com/solid/solid-ui/blob/master/src/widgets/dragAndDrop.js/uploadFiles check if contentType match file extension L170-173
var extension = mime.extension(theFile.type) if (theFile.type !== mime.lookup(theFile.name)) { suffix = '_.' + extension console.log('MIME TYPE MISMATCH -- adding extension: ' + suffix)
The same control is made in NSSv5.2.0 in resource-mapper.mapUrlToFile L108-110
The control should be deleted from solid-ui
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in solid-ui's src/widgets/dragAndDrop.js uploadFiles around lines 170-173 and compare the MIME-type check with NSSv5.2.0 resource-mapper.mapUrlToFile at lines 108-110. Confirm how resource creation currently handles the extension, then remove the duplicated control from solid-ui. Done means the redundant check and its suffix behavior are no longer present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100