source-cooperative / source-cooperative/source.coop
[Bug] Users should not be able to upload files or directories when viewing a single file object
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 26
- Forks
- 9
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 42
Description
Description of Bug:
Uploading a file while viewing an object changes the object into a directory. At least that is what seems to happen... prefixes are weird.
Steps to Reproduce:
- Create a product
- Upload a text file (README.md or similar)
- View the file contents (e.g.
https://source.coop/tyler/test-files/README.md) - Enter "Edit Mode" -> "Upload files"
- Note that nothing changes on the screen
- Navigate up one level. Note that the file now appears as a directory (i.e. there is a caret ">" beside the file)
Expected Behavior:
The interface should switch to "Read Only" mode when viewing the object's page. The "Upload file" or "Upload directory" options should not appear.
Actual Behavior:
The files appear to upload successfully (i.e. no error) but I don't see how to navigate to the file (or delete them).
Screenshots:
Additional Context:
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.
Research direction
Start at the object page's Edit Mode and inspect how the Upload files and Upload directory options are shown when viewing a single file. Verify the page switches to Read Only for file objects, hides both upload options, and prevents uploads from changing the file into a directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100