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

Fix tarball upload #578

Merged
merged 1 commit into from
May 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion celery_worker/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def upload(img_tarball, hash_id, upload_id, timestamp=None, n_subjects=None):
try:
# Untar:
tmp_dir = Path(mkdtemp())
with tarfile.open(img_tarball) as tf:
with tarfile.open(img_tarball, mode="r:gz") as tf:
tf.extractall(tmp_dir)
except Exception as e:
update_record(
Expand Down
2 changes: 1 addition & 1 deletion neuroscout/resources/analysis/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class FileField(wa.fields.Raw):
@doc(tags=['analysis'])
class AnalysisUploadResource(MethodResource):
@doc(summary='Upload fitlins analysis tarball.',
consumes=['multipart/form-dat', 'application/x-www-form-urlencoded'])
consumes=['multipart/form-data', 'application/x-www-form-urlencoded'])
@marshal_with(NeurovaultCollectionSchema)
@use_kwargs({
"tarball": FileField(required=True),
Expand Down