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 multi-file write support #196

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

0div
Copy link
Contributor

@0div 0div commented Oct 4, 2024

Description

Create separate multipart.Part method to get file name with full path with directories.

Tests

See the tests in e2b-dev/E2B#451

@0div 0div requested a review from ValentaTomas October 4, 2024 18:03
Copy link

linear bot commented Oct 4, 2024

@0div 0div changed the title Added multi-file write support Add multi-file write support Oct 4, 2024
@0div 0div self-assigned this Oct 4, 2024
@0div 0div added the improvement Improvement for current functionality label Oct 4, 2024
@0div 0div closed this Oct 7, 2024
@0div 0div deleted the add-a-way-to-upload-several-files-to-a-sandbox-at-once-e2b-954 branch October 7, 2024 14:37
@0div 0div reopened this Oct 8, 2024
@0div
Copy link
Contributor Author

0div commented Oct 8, 2024

@ValentaTomas per discussion in e2b-dev/E2B#451, I overloaded the multipart.Part.FileName() method so that it's possible to get the full path with directories. It's unsafe for regular web apps, but in our sandboxes it's ok, correct? I adapted the js-sdk to include nested paths and it works.

@ValentaTomas
Copy link
Member

ValentaTomas commented Oct 8, 2024

Yes, I think it should be okay for us because we are giving users access to the whole sandbox, so this is not a security risk.

@ValentaTomas
Copy link
Member

Is it tested for the old file uploads via SDK when passing relative and absolute path and uploads via URL (with the path being part of the multipart)?
I just want to make sure it is compatible with the current usage.

…y-to-upload-several-files-to-a-sandbox-at-once-e2b-954
@0div 0div requested a review from jakubno as a code owner December 11, 2024 18:31
@0div
Copy link
Contributor Author

0div commented Dec 11, 2024

Is it tested for the old file uploads via SDK when passing relative and absolute path and uploads via URL (with the path being part of the multipart)? I just want to make sure it is compatible with the current usage.

New write tests have passed as follow: https://github.com/e2b-dev/E2B/pull/503/files#diff-7a70570a2ea87cb7d3e355b0aa6f011a4bec4d1733f40bf94b05e4024f232b01

@jakubno jakubno changed the base branch from main to dev December 20, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement for current functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants