Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

handle whitespace for file uploads (attempt 2) #567

Merged
merged 11 commits into from
Aug 16, 2017
Merged

Conversation

Floppy
Copy link
Contributor

@Floppy Floppy commented Aug 11, 2017

Fixes #427. We upload to s3 and then download, both using the s3 API not public URLs. But we were turning the storage keys into URLs for passing around, completely unnecessarily. This change makes the code just pass around storage keys, which don't need special encoding.

@Floppy Floppy temporarily deployed to octopub-pr-567 August 11, 2017 09:59 Inactive
@Floppy Floppy self-assigned this Aug 11, 2017
@Floppy Floppy temporarily deployed to octopub-pr-567 August 15, 2017 20:28 Inactive
@Floppy Floppy temporarily deployed to octopub-pr-567 August 15, 2017 20:34 Inactive
# Conflicts:
#	app/assets/javascripts/file_upload.js
#	app/controllers/concerns/file_handling_for_datasets.rb
#	app/models/dataset_file.rb
#	spec/features/add_github_public_dataset_spec.rb
@Floppy Floppy temporarily deployed to octopub-pr-567 August 15, 2017 20:39 Inactive
@Floppy Floppy requested a review from quadrophobiac August 15, 2017 20:40
@Floppy Floppy added this to the FSA phase 3 wrapup milestone Aug 15, 2017
@quadrophobiac
Copy link
Collaborator

quadrophobiac commented Aug 16, 2017

Hey @Floppy is this good to review & approve or is it still WIP?

@@ -305,7 +305,7 @@
{
title: "New file",
description: "New file description",
file: "http://example.com/new-file.csv",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how come example.com is removed in this spec?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the file key in the S3 uploader is no longer a URL, just the storage key. So I've removed the protocol and port which would have been added before.

@Floppy
Copy link
Contributor Author

Floppy commented Aug 16, 2017

Good to go.

@Floppy Floppy changed the title [WIP] handle whitespace for file uploads (attempt 2) handle whitespace for file uploads (attempt 2) Aug 16, 2017
@Floppy
Copy link
Contributor Author

Floppy commented Aug 16, 2017

Sorry forgot to remove WIP tag, this is OK to merge.

@Floppy Floppy merged commit 5407374 into master Aug 16, 2017
@Floppy Floppy deleted the fix-whitespace-files branch August 16, 2017 12:07
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants