Refactor uploaded files to distinguish between post, chat, and group uploads
Open
@julianlam is already working on this.
Since Jun 15, 2022.
breaking change (plugins)
enhancement
- Dominant language
- JavaScript
- Stars
- 15.2k
- Forks
- 3k
- Avg merge
- 16h 19m
- Merged PRs (30d)
- 167
Description
via #10659
- When a picture is uploaded, save it to
os.tmpdir() + '/nodebb/uploads/{post|chat}' - When the chat message is sent or the post is submitted, move the upload to the appropriate folder (probably as part of
posts.uploads.sync()) - Save post uploads to
public/uploads/post - Save chat uploads to
public/uploads/chat - Save group covers to
public/uploads/group - Fix the client-side code (that shows post association) to reference the new path
- Access Controls
- For any given upload, check to see if it is in any pid or mid. If so, check access privilege. Otherwise 403.
- Remove
privateUploadsconfig property
- Migration
- Move all non-orphaned post uploads to the new folder
- Read through all sent messages and associate images with mids
- Move chat uploads to the new folder
- Archive remaining files into a separate folder (for manual deletion)
Contributor guide
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.
Assessment
This issue has not been assessed yet.