assemblee-virtuelle / assemblee-virtuelle/semapps
Use UUID for uploads filenames
- Dominant language
- TypeScript
- Stars
- 103
- Forks
- 14
- Avg merge
- 1m
- Merged PRs (30d)
- 2
Description
Currently the filename of uploaded files is passed as a slug.
The generated slug is also used to write the file on the filesystem.
This generates several problems:
- If the file already exist, it will generate a name like `picture.jpg2`
- Files are not read protected (to be able to make it appear on browsers), so it can be easy to find the URL
- We cannot put all the files on the same directory, because two `picture.jpg` uploaded in two different containers may conflict
A solution could be to use a UUID for both the URL and the filename.
We could then save all files on the same directory (except for pods, where it's better to keep them in different folders)
Since we save the MIME type, we shouldn't need to keep track of the original file extension.
Contributor guide
No contributing guide indexed for this repository
Research direction
No file or test is named. Start by locating the upload filename/slug generation and MIME-type persistence, then trace how URLs and pod directories are chosen. Done means duplicate uploads do not collide, filenames and URLs use UUIDs, and the existing MIME type remains sufficient without the original extension.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100