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

Send directories? #1

Closed
nthiery opened this issue May 10, 2020 · 11 comments
Closed

Send directories? #1

nthiery opened this issue May 10, 2020 · 11 comments

Comments

@nthiery
Copy link

nthiery commented May 10, 2020

Thanks so much for cloudsend! It arrives just on time for my needs :-)

Would it be possible to send (recursively) a directory instead of a single file?
Probably not: I did not even manage to do it from the file-drop web page.

@tavinus
Copy link
Owner

tavinus commented May 13, 2020

Sending directories is currently not supported.

You would have to make a script that will iterate through the files and send each one on its call.

Also, cloudsend had no MakeDir call. CloudManager has makedir, but is not for sending files to public shares and also does not currently support sending folders.

@nthiery
Copy link
Author

nthiery commented May 14, 2020 via email

@tavinus
Copy link
Owner

tavinus commented May 14, 2020

Yep. You can tar/zip the folder and send it as well.

Apart from that we would need to send all files, one by one anyways, even if I would implement it here.

And there is no support to creating folders at the destination (all files would be sent to the shared folder root). I don't think I can do anything about that.

@tavinus
Copy link
Owner

tavinus commented May 14, 2020

Hi. I have released a new version (2.1.0) which can both send multiple files (using globs) and also send piped content (using - OR . as input file name).


Here are the release notes:

  • Adds stdin as input option (piped content)
    • uses either - or . as input file name
    • requires -r <filename>
  • Allows to use globbing at the input
    • can send multiple files by using globs
    • requires -g option
    • not compatible with -r <name> option (rename)
  • Adds new checks and parsing
  • Cleaned up unused code
  • Updated readme and --help

There is more info on the main Readme file.

@tavinus
Copy link
Owner

tavinus commented May 15, 2020

I have updated the readme with an example on how to send an entire folder (and/or subfolders) using find + cloudsend.

Folder send with find example:

find ./ -maxdepth 1 -type f -exec ./cloudsend.sh {} https://cloud.mydomain.tld/s/TxWdsNX2Ln3X5kxG -p yourPassword \;

This sends everything on the current shell folder.

  • change the first ./ to change the input folder (eg. '/home/myname/myfolder')
  • -maxdepth 1 will read current folder only, more levels go deeper, supressing goes all levels.

@nthiery
Copy link
Author

nthiery commented May 15, 2020

Thanks! I just tried the find way. It has one caveat though: the directory structure is flattened.

@tavinus
Copy link
Owner

tavinus commented May 15, 2020

Yep, there is no way to create sub-folders.

If you want to keep the tree, it would be better to send a zip or tarball.

@tavinus
Copy link
Owner

tavinus commented Jul 30, 2020

Like mentioned, we cannot create folders into shared links, so need to flatten or send a zip/tarball.

After more than 2 months I will guess this is solved.
Feel free to post again or reopen if the problem persists.

@tavinus tavinus closed this as completed Jul 30, 2020
@tavinus
Copy link
Owner

tavinus commented May 1, 2021

Hi @nthiery

v2.2.0 is out and is the first version that can send folders.

This one will actually create the whole tree and send everything.

https://github.com/tavinus/cloudsend.sh/releases/

Cheers!

@nthiery
Copy link
Author

nthiery commented May 1, 2021 via email

@tavinus
Copy link
Owner

tavinus commented May 1, 2021

Just pushed v2.2.1 with some fixes to the log messages.

Cheers

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

No branches or pull requests

2 participants