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
Add X-Url-Delete-* headers to POST handler #435
Conversation
We could send multiple The delete url already contains the full get url including the filename |
0070faf
to
df4e135
Compare
@anihm136 are you still going to work on this? otherwise I will create a new branch with the fix, thanks :) |
Sorry, I'm a little packed right now. Please go ahead with the fix |
Hey @aspacca I have some time on my hands for the next week or so. Shall I go ahead and finish this? |
@anihm136 thanks could you fix the conflict with main branch? there was some refactoring since you opened your branch |
557506f
to
4c80250
Compare
Should be done |
@anihm136 can you fix the linting? thanks |
Done. Unfortunately I missed it because my editor uses the |
server/handlers.go
Outdated
deleteURL, _ := url.Parse(path.Join(s.proxyPath, token, filename, metadata.DeletionToken)) | ||
w.Header().Add("X-Url-Delete", resolveURL(r, deleteURL, s.proxyPort)) | ||
responseBody += fmt.Sprintln( getURL(r, s.proxyPort).ResolveReference(relativeURL).String()) | ||
s.cleanTmpFile(file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not need this call here, due to the defer in L319.
Fixes #419
Adds X-Url-Delete headers to the post handler. Since the post handler currently supports multiple file uploads (as multipart file form), currently the header is postfixed with the token of the file to create a unique delete token for each file (any better suggestions for handling this can be implemented)