dutchcoders / transfer.sh

Easy and fast file sharing from the command-line.
https://github.com/dutchcoders/transfer.sh
MIT License
15.09k stars 1.54k forks source link

Deletion token issues #555

Open sinkaroid opened 1 year ago

sinkaroid commented 1 year ago

Same behaviour with #465, it would be nice if this service remake this clunky behaviour, Since end user cannot retrieve this after the upload anymore at least give us some response that show in the curl options, I never get the deletion token at all

sinkaroid commented 1 year ago

@stefanbenten Could you check the email, I've requests deletion for this

aspacca commented 1 year ago

@sinkaroid what's the clunky behaviour?

there was no way to delete the uploads, before introducing the feature, and in order to not break compatibility we had no other choice than to add the delete token/delete url in the headers

everything is documented: https://github.com/dutchcoders/transfer.sh#x-url-delete https://github.com/dutchcoders/transfer.sh#bash-and-zsh-with-delete-url-delete-token-output-and-prompt-before-uploading

sinkaroid commented 1 year ago

The thing is my first time found this, because i doing some migrate stuff to another server I just put curl --upload-file ./package.json I get the url uploaded but not for the token

I know everything is documented properly, I also able the upload new file and delete them immediately with grep -i -E 'transfer\.sh|x-url-delete'

My thoughts is don't just recommending user with: curl --upload-file ./hello.txt https://transfer.sh/hello.txt

aspacca commented 1 year ago

My thoughts is don't just recommending user with: curl --upload-file ./hello.txt https://transfer.sh/hello.txt

👍

I will try to find time to improve that. feel free to open a PR on your own if you are able to, thanks :)

adamantike commented 1 year ago

I found this command as a simple one-liner to retrieve the delete URL after uploading the file, in case it's useful to include in the documentation:

curl -s -o /dev/null -w '%header{x-url-delete}\n' --upload-file ./hello.txt https://transfer.sh/hello.txt
aspacca commented 1 year ago

I found this command as a simple one-liner to retrieve the delete URL after uploading the file, in case it's useful to include in the documentation:

feel free to open a PR to add it to the docs as default example or with a big warning about "how to delete an upload" :)