transfer.sh icon indicating copy to clipboard operation
transfer.sh copied to clipboard

Bug: Error 404 when try to delete file uploaded via zsh function

Open salmannotkhan opened this issue 2 years ago • 8 comments

First of it doesn't give any deletion token when we upload file via zsh function/plugin Another thing is it shows delete button whenever someone visits the link and it prompts for deletion token but when we click on confirm button it shows "Error (404) during deletion of file"

So, I'll suggest to remove delete button completely. and also I want to know when files deleted from the server?

salmannotkhan avatar Sep 14 '21 18:09 salmannotkhan

We won't remove the delete button, since it's working properly: you have to provide the deletion token, as stated in the hint. When you click the button a DELETE request is made to token/filename/deletionToken, if the deletion token is wrong or empty, the request result in a 404 (not found)

Deletion token is returned on upload in the header X-Url-Delete, zsh function doesn't print it: I never used zsh so I wouldn't be able to modify. Any external PR to enanche the zsh function is welcome

aspacca avatar Sep 14 '21 20:09 aspacca

I want to know when files deleted from the server

every server can setup it's own purge period. If the server you've uploaded to is using v1.3.0 the purge time is reported in the homepage

aspacca avatar Sep 14 '21 20:09 aspacca

So I think it's useless to show that delete button

On Wed, Sep 15, 2021, 1:51 AM Andrea Spacca @.***> wrote:

I want to know when files deleted from the server

every server can setup it's own purge period. If the server you've uploaded to is using v1.3.0 the purge time is reported in the homepage

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dutchcoders/transfer.sh/issues/409#issuecomment-919484591, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGN64PCIV2KWJJJXJIC3TGLUB6VDVANCNFSM5EAW5QEQ .

salmannotkhan avatar Sep 15 '21 02:09 salmannotkhan

Deletion token is returned on upload in the header X-Url-Delete, zsh function doesn't print it: I never used zsh so I wouldn't be able to modify. Any external PR to enanche the zsh function is welcome

Okay, I'll try that. Also when you click confirm again and again it appends the error into same error instead of replacing it completely.

salmannotkhan avatar Sep 15 '21 12:09 salmannotkhan

Where can I find the script for transfer cli command?

salmannotkhan avatar Sep 15 '21 15:09 salmannotkhan

Also when you click confirm again and again it appends the error into same error instead of replacing it completely.

nvm I made PR on transfer.sh-web repo for that fix

salmannotkhan avatar Sep 15 '21 17:09 salmannotkhan

Deletion token is returned on upload in the header X-Url-Delete, zsh function doesn't print it: I never used zsh so I wouldn't be able to modify. Any external PR to enanche the zsh function is welcome

That's why ! I was searching where the hell I should be supposed to have received it. Maybe it would be good to warm people somewhere in the README.md text, zsh is even the default shell under MacOS

imTHAI avatar Dec 17 '21 12:12 imTHAI

Some command line clients do not print headers by default, please consider to return JSON object instead of a simple string:

{
  "downloadUrl": "string",
  "deletionUrl": "string"
}

corporateuser avatar Jul 05 '22 07:07 corporateuser

@corporateuser sorry, that will be a breaking change

aspacca avatar Sep 12 '22 02:09 aspacca