-
Notifications
You must be signed in to change notification settings - Fork 6
Fix to dataset extractor #640
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
Conversation
i think this fixes the issue with file upload, but not sure whether it will cause any other changes.
uploaded by mmistake
…dataset-extractor # Conflicts: # frontend/package-lock.json
|
So the key issue is "token" no longer needed since it's handled by dependencies? |
|
Yes. There was a dependency for Security that we no longer use that only works with token, but not API key. It was removed in other routes but was still in the file upload. Token was used in methods but, in the end, wasn't used in the last one, so I removed it. The user info is still used with rabbitmq and posting the jobs. |
tcnichol
left a comment
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.
Tested.
Works with the pyclowder branch, the file posts into the dataset now. Approved.
… with the method from mimetypes also changed in visualization.
|
I made 1 fix here based on the debugging from Friday. Mimetypes.get_content_type was being given a io.FileBytesIO, but it needed the file name. So it now is sent the file name from the new_file File object that is created. I tested and this still works with visualization. Since I had it working I went ahead and pushed here while I remembered. With the dataset extractor, the file that gets sent does have None for a filetype but this does correctly find the filetype from the filename and the entry is added in minio. When downloaded the file is the same now. |
|
@tcnichol Thanks. It needed one little change. Now everything is working. |
max-zilla
left a comment
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.
tested with pyclowder PR extractor, merging both
fixes to dataset.py to make dataset extractor working.
To test, please run test-dataset-extractor from clowder-framework/pyclowder#67
Trigger it on any dataset.