source-cooperative / source-cooperative/source.coop

[Bug] Users should not be able to upload files or directories when viewing a single file object

Open Beginner friendly
#433 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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:

  1. Create a product
  2. Upload a text file (README.md or similar)
  3. View the file contents (e.g. https://source.coop/tyler/test-files/README.md)
  4. Enter "Edit Mode" -> "Upload files"
  5. Note that nothing changes on the screen
  6. 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:

Image Image

Additional Context:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.