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

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

Closed
salmannotkhan opened this issue Sep 14, 2021 · 9 comments
Closed

Comments

@salmannotkhan
Copy link

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?

@aspacca
Copy link
Collaborator

aspacca commented Sep 14, 2021

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
Copy link
Collaborator

aspacca commented Sep 14, 2021

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

@salmannotkhan
Copy link
Author

salmannotkhan commented Sep 15, 2021 via email

@salmannotkhan
Copy link
Author

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
Copy link
Author

salmannotkhan commented Sep 15, 2021

Where can I find the script for transfer cli command?

@salmannotkhan
Copy link
Author

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

@imTHAI
Copy link

imTHAI commented Dec 17, 2021

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

@corporateuser
Copy link

corporateuser commented Jul 5, 2022

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"
}

@aspacca
Copy link
Collaborator

aspacca commented Sep 12, 2022

@corporateuser sorry, that will be a breaking change

@aspacca aspacca closed this as completed Sep 12, 2022
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

4 participants