Skip to content

Implementing binary file open/download (requires micropython.js 1.5.0) #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 19, 2024

Conversation

ubidefeo
Copy link
Collaborator

In order not to break the current fs_cat behaviour which is also used to load files into the editor, I have implemented a couple more methods that only deal with transferring files from the board to the computer.
The reading in chunks is converted to a comma separated string of integers and JS handles the creation of a Buffer from the extracted integers.

I tested downloading text files and binaries and executing an md5sum of the file before being uploaded to the board and after being downloaded

@ubidefeo ubidefeo marked this pull request as draft November 14, 2024 06:49
@ubidefeo ubidefeo changed the title Implemented binary file download. Implementing binary file open/download Nov 14, 2024
@ubidefeo ubidefeo changed the title Implementing binary file open/download Implementing binary file open/download (requires changed micropython.js) Nov 14, 2024
@ubidefeo ubidefeo marked this pull request as ready for review November 14, 2024 17:46
@ubidefeo ubidefeo changed the title Implementing binary file open/download (requires changed micropython.js) Implementing binary file open/download (requires micropython.js 1.5.0) Nov 15, 2024
Copy link
Contributor

@murilopolese murilopolese left a comment

Choose a reason for hiding this comment

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

I didn't test it a lot but the code is good.

@ubidefeo ubidefeo merged commit 819a6dd into development Nov 19, 2024
1 check passed
@ubidefeo ubidefeo deleted the feature/download-file-as-binary branch November 19, 2024 13:00
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.

2 participants