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
Detect when upload from URL gives an HTTP error #189
Comments
maybe have field for upload url. |
A upload failed message is generated when a 401 error is received (through having an .htpasswd protected directory) and no zero byte file is created. |
Uploading an actual zero byte file (that will give a 200 HTTP code) will create a document record but not create a directory and empty file in the appropriate documents sub-directory, |
301 redirects do not cause issues. Upload fails if redirect URL 404s and file from that redirected URL is uploaded if it is present. Adding the upload_url field will be useful to work out what URL was actually submitted to upload from URL. |
After reviewing various potential reasons behind this issue. I think the above two improvements is as much as we can do for now. They will hopefully limit situations where zero byte file eprints get added to the live archive and give some traceability if they do. |
A common problem when using Upload from URL, is that users submit a URL, which is behind a login. Therefore, when EPrints tries to download the publication, it gets redirect to a login screen or 403 page and ends up downloading this rather than the intended file (i.e. the PDF document of the publication). Upload from URL should be improved to make sure it does not get a an HTTP error code and it it does, not download anything it gets back from the HTTP request, as this will not be the intended file.
The text was updated successfully, but these errors were encountered: