Skip to content
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

Add binary module upload support and code size/limit informational output #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

shanemadden
Copy link

  • Adds support for .wasm binary file upload - now ignoring files other than .js/.wasm (instead of avoiding stripping their file extension then uploading them as utf-8 text) and logging that it does so, as I don't think there's use cases that would need that, but correct me if I'm wrong!
  • Tracks and adds some log output showing the size of the code upload and the percentage of the code upload limit being used.

@AlinaNova21
Copy link
Member

now ignoring files other than .js/.wasm (instead of avoiding stripping their file extension then uploading them as utf-8 text) and logging that it does so, as I don't think there's use cases that would need that, but correct me if I'm wrong!

I've actually had use cases for that before, uploading raw json or other encoded formats, not using it currently, but have before.

@shanemadden
Copy link
Author

shanemadden commented Aug 15, 2023

Gotcha - so then for those, I'm thinking leave the extension as-is, encode as utf-8 - and maybe print a bit of text that says that binary data might be lost? 🤔 (essentially, the old behavior with more logging)

@shanemadden
Copy link
Author

Updated implementation to just do what it used to for other file types, with a bit of added logging. (There might be other file formats people would also want to upload as binary for loading from their bots, so the logging makes clear that it's uploading 'as text' - not going to try to predict what file extensions they'd want but will serve as a hint for what they need to change to get it uploading those as binary)

@CarsonBurke
Copy link
Member

@AlinaNova21

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