-
Notifications
You must be signed in to change notification settings - Fork 407
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
Upload exceptions when both the file and source options are used #3767
Comments
|
Happens for me too when manually uploading a file and specifying any source whatsoever. Might be more complicated than this, but it seems to fix it for me: --- a/app/logical/upload_service/preprocessor.rb
+++ b/app/logical/upload_service/preprocessor.rb
@@ -33,25 +33,25 @@ class UploadService
memoize :canonical_source
def in_progress?
- if Utils.is_downloadable?(source)
- return Upload.where(status: "preprocessing", source: source).exists?
- end
-
if md5.present?
return Upload.where(status: "preprocessing", md5: md5).exists?
end
+ if Utils.is_downloadable?(source)
+ return Upload.where(status: "preprocessing", source: source).exists?
+ end
+
false
end
def predecessor
- if Utils.is_downloadable?(source)
- return Upload.where(status: ["preprocessed", "preprocessing"], source: source).first
- end
-
if md5.present?
return Upload.where(status: ["preprocessed", "preprocessing"], md5: md5).first
end
+
+ if Utils.is_downloadable?(source)
+ return Upload.where(status: ["preprocessed", "preprocessing"], source: source).first
+ end
end
def completed? |
in case both an upload from disk and a source were specified, this caused an md5 mismatch error to be thrown
#3767: Prioritize md5 check over source download
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Seems like there's still a few problems with uploading.
The text was updated successfully, but these errors were encountered: