Closed Ra-pira closed 1 year ago
No one seems to have answered yet. You can use the built-in API and curl.
Upload file:
curl -X POST -T file.txt http://localhost:8080
Download file:
curl -o file.txt http://localhost:8080/file.txt
Create a directory:
curl -X PUT http://localhost:8080/media/
Delete a file/directory:
curl -X DELETE http://localhost:8080/file.txt
curl -X DELETE http://localhost:8080/media/
Replace https://localhost:8080 with your URL. In addition, there is a dclone that can upload an entire directory.
there is also an identical issue here, but here I have described it in more details.
Replace https://localhost:8080 with your URL. In addition, there is a dclone that can upload an entire directory.
whats the correct usage of the dclone path command? tried using it but it goes nowhere, i can't find it in the html page
Replace https://localhost:8080 with your URL. In addition, there is a dclone that can upload an entire directory.
whats the correct usage of the dclone path command? tried using it but it goes nowhere, i can't find it in the html page
npm i -g @forscht/ddrive
dclone -t token -c channel -p ./
made a small .sh
script since i host ddrive from termux:
for file in /local-path/*
do
# if you have auth credentials set in ddrive, specify them in curl using "--user user:pass"
# $file is the path+filename, "basename" command returns just the filename
curl -X POST -T $file http://127.0.0.1/ddrive-path/$(basename $file)
done
helps when i need to upload a lot of files inside one folder
exactly as the title says