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

Fix Issue #4946 Basic folder upload for sftp electron. #9891

Merged
merged 12 commits into from
Aug 24, 2024

Conversation

marko1616
Copy link
Contributor

@marko1616 marko1616 commented Aug 21, 2024

🚀 Basic Folder Upload Feature for SFTP in Electron

Status: Finished.

📝 Description

I have implemented a folder upload feature for the SFTP functionality within Electron. This enhancement allows users to upload entire folders, which could significantly improve the user experience for bulk file transfers.

🙏 Acknowledgments

I would like to express my sincere gratitude to all the project developers for their continued efforts and invaluable contributions. Your hard work has laid the foundation for features like this to be developed.

🚧 Next Steps

If the team agrees that this is a suitable implementation:

  1. 🔍 Refinement: I will incorporate your feedback and make necessary adjustments.
  2. 🧪 Testing: Further testing and validation will be conducted to ensure robustness.
  3. Completion: Final touches and documentation updates.
  • Ensure empty directory can be created.
  • Add support for startUploadFromDragEvent .

Relative issues

#4946 #9841 #9738 #9569

Thank you for taking the time to review this PR. Your insights and suggestions will be highly appreciated!

Copy link
Owner

@Eugeny Eugeny left a comment

Choose a reason for hiding this comment

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

Just a few comments, looks good otherwise!

Also, startUploadFromDragEvent would need to also support folder drop events too

tabby-ssh/src/components/sftpPanel.component.ts Outdated Show resolved Hide resolved
tabby-ssh/src/components/sftpPanel.component.pug Outdated Show resolved Hide resolved
tabby-ssh/src/components/sftpPanel.component.pug Outdated Show resolved Hide resolved
tabby-ssh/src/components/sftpPanel.component.ts Outdated Show resolved Hide resolved
tabby-core/src/api/platform.ts Outdated Show resolved Hide resolved
tabby-electron/src/services/platform.service.ts Outdated Show resolved Hide resolved
tabby-ssh/src/components/sftpPanel.component.ts Outdated Show resolved Hide resolved
marko1616 and others added 2 commits August 21, 2024 17:25
Co-authored-by: Eugene <x@null.page>
@marko1616
Copy link
Contributor Author

marko1616 commented Aug 21, 2024

What do you think about making a directory as an ElectronFileUpload object? This way, we can treat a directory as a file, ensuring that even empty directories can be uploaded.

@marko1616 marko1616 requested a review from Eugeny August 22, 2024 00:16
@Eugeny
Copy link
Owner

Eugeny commented Aug 22, 2024

If you'd like to implement empty folder "uploading", I suggest two ways:
a) have startUploads[FromDragEvent] return (FileUpload|EmptyDirectory)[] where EmptyDirectory is { relativePath: string }
b) implement DirectoryUpload that would specify its children explicitly, this way you can also avoid the need for relativePath altogether

@marko1616
Copy link
Contributor Author

Oaky I'v done all the feats.

@marko1616
Copy link
Contributor Author

marko1616 commented Aug 24, 2024

cc @Eugeny you can now have a final check for this pr.Thx
I've done all the necessary tests.

@Eugeny
Copy link
Owner

Eugeny commented Aug 24, 2024

Looking good now, thanks!

@all-contributors please add @marko1616 for code

@Eugeny Eugeny merged commit af0e25e into Eugeny:master Aug 24, 2024
2 checks passed
Copy link
Contributor

@Eugeny

We had trouble processing your request. Please try again later.

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