Comments (6)
Hey @MuellerSeb ,
v2.2.0 is out and is the first version that can send folders.
https://github.com/tavinus/cloudsend.sh/releases/
Can you test it for me please?
Cheers!
from cloudsend.sh.
Just pushed v2.2.1 with some fixes to the log messages.
Cheers
from cloudsend.sh.
Maybe with:
curl -X MKCOL
That is also done by pyocclient:
https://github.com/owncloud/pyocclient/blob/72a6666d7b9d022b5ee573a9d2568a0547823351/owncloud/owncloud.py#L702
from cloudsend.sh.
Hi. Thanks for the info.
Something like this seems to work:
/usr/bin/curl -X MKCOL -u '2hsB1zw2q4frZsg:' -H 'X-Requested-With: XMLHttpRequest' 'https://cloud.mydomain.tld/public.php/webdav/TESTFOLDERNAME'
This opens the possibility to send the tree, but we still need to iterate through each file and subfolder, creating each folder and sending each file to its destination. This needs to traverse the whole tree, making a curl call to each item (file/folder).
I am still checking if I can make curl do the hard lifting, it is not looking good though.
My cloudmanager program also has this as a pending problem (sending entire folders).
I tried using curl --ftp-create-dirs
with find
, but that does not seem to work in this case. ( Reference )
I think the proper way would be to have 2 recursive functions. The first would traverse all subfolders and create them at the target, while the second would traverse all files and send them, each to its proper subfolder.
We can probably just make 2 calls with find -exec curl
(one for folders, one for files).
I will keep testing...
Edit: I am implementing it. It is a bit complex, so it will take a bit of time. Also, I will probably need readlink -f
, which is not present in MacOS/BSD systems. I have a bash implementation of it in my pdfScale app. Seems like I will need it only when the current folder is passed to be sent, so I may be able to use PWD
/ $pwd
instead. Seems like it will work, currently it already creates all the folders, but I still need to add a lot of error checkings and change the behaviour of older things. Also, it may be a bit slow to send a large tree and I am still figuring out how to log all of that to screen, if I should list all and ask before sending, etc, etc.
from cloudsend.sh.
I have it almost done.
It is fully working already.
Just cleaning up, making some more tests, fixing messages and some other minor things.
The curl --progress-bar
"Spaceship Bar" span multiple lines in some systems, which was quite the pain to debug. I ended up fixing the BAR in a maximum of 80 Columns and that seems to solve the problem. This is not a critical bug, but it totally breaks the output when it happens.
The same thing would happen when calling curl directly.
This should have been fixed here: curl/curl#4849
It will probably take some time until it reaches most OSes, so I will keep it like this.
This is how it is working at this moment
It first creates all folders and then sends all files. The folder calls do not use curl's progress-bar (thank god), It just prints OK when Done or the error message from the XML (may need to refine for curl errors as well). The file sending part will display curl's progress-bar for each file.
This is how it looks like if the folders already exists.
It will overwrite existing files as it does in a single file send.
I will be pushing it soon...
from cloudsend.sh.
Hi. It's been a couple of months without reply, so I will close this.
Feel free to post again or reopen if needed.
Cheers!
Gus
from cloudsend.sh.
Related Issues (13)
- Send directories? HOT 11
- RPM package for ROSA HOT 2
- Transfer of files/directories with # in name does not work HOT 4
- return URL after uploading ? HOT 4
- Get curl --limit-rate settings accessible HOT 3
- Support chunked upload HOT 2
- Option to specify the remote file name HOT 9
- Screenshots HOT 1
- Progress bar HOT 2
- Upload to Nextcloud 21 does not work HOT 6
- Better messages for globbing HOT 1
- Sending to existing subfolder HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudsend.sh.