Skip to content

File system guides updated for the new upload/download functionality#374

Open
rijulshrestha wants to merge 6 commits intomainfrom
File-System-Guides-Update
Open

File system guides updated for the new upload/download functionality#374
rijulshrestha wants to merge 6 commits intomainfrom
File-System-Guides-Update

Conversation

@rijulshrestha
Copy link
Copy Markdown
Contributor

No description provided.

@rijulshrestha rijulshrestha requested a review from epanholz March 26, 2026 11:37
@epanholz
Copy link
Copy Markdown
Member

Overall already very happy with how this looks. Some inputs:

FIlesystem guide:
Please add screenshots to the section that explains how to upload files through the file picker. We also need to point out that files imported to /files/uploads/ are not persistent and will be gone upon browser restart. Also this line:

To open or import an uploaded file from within the application, use the application's file picker and navigate to /files/uploads/, then select the file you want to load.

I think we can just say something like this "Files imported this way will be available in the virtual /files/uploads/ directory." I think any additional context might be confusing to some users.

FIlesystem support explanation:
Please also add at the new directories to the graph at the top of the page. We can add another graph called "Directories", that lists /files/uploads/ and /files/downloads. Here we also need to point that /uploads is not persistent.

The "Specialized directories" section here looks good. Please just also add that /uploads is not persistent and we can also add a screenshot on how the upload button looks.

Also you opened a draft PR, we won't be able to merge this one after review.

@GabrielaReyna GabrielaReyna marked this pull request as ready for review March 26, 2026 18:49
@GabrielaReyna GabrielaReyna self-requested a review as a code owner March 26, 2026 18:49
@rijulshrestha
Copy link
Copy Markdown
Contributor Author

I've added a screenshot highlighting the upload button. I'm not sure that the picture I uploaded is best suited. When I try to just zoom in the upload button it gets blurry and seems a bit weird. Open to suggestion on what should go on as a screenshot for the upload button.

@rijulshrestha rijulshrestha self-assigned this Mar 30, 2026
Copy link
Copy Markdown
Member

@epanholz epanholz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good already. Requested some more small changes.

### Method 1: Using the file picker upload button

The quickest way to place a file into CheerpJ’s virtual filesystem from JavaScript is `cheerpOSAddStringFile`. It’s ideal for string content and also supports binary data.
CheerpJ's built-in file picker dialog includes an **upload button** (upward arrow icon) in the top-right corner. Clicking it opens the browser's native file picker, allowing the user to select a file from their local machine. The selected file is automatically placed into **`/files/uploads/`** and becomes available to the Java application immediately. No JavaScript is required.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again the upload icon is not just present on file dialogs, it's present on all windows with a title bar. Using the file dialog is often the most convenient way since users already want to interact with files. Please rewrite this a bit.

For the applet docs we might need extra context since applet window frames don't have title bars, there we can mention the file dialog. (other pr)

@rijulshrestha rijulshrestha requested a review from epanholz March 30, 2026 13:58
Copy link
Copy Markdown
Member

@epanholz epanholz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added one last comment about the table in the explanation. Once that is applied it's ready for merging. Good job.

Note: I will be holding off merging this until we release a new point version of CJ, which we plan to do soon.

@rijulshrestha rijulshrestha requested a review from epanholz March 31, 2026 11:57
Copy link
Copy Markdown
Contributor

@GabrielaReyna GabrielaReyna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. As a minor thing, the directory tree could be added as a code block, just like we did in http://localhost:4321/docs/tutorials/swingset3 at the beginning of both guides.

@rijulshrestha
Copy link
Copy Markdown
Contributor Author

Thanks for the suggestion. I've added a directory tree structure at the beginning of both guides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants