Ticket #1518 (assigned defect) — at Version 4
CKAN Upload fails if filename has spaces in it
Reported by: | markbrough | Owned by: | rgrp |
---|---|---|---|
Priority: | critical | Milestone: | ckan-sprint-2011-12-19 |
Component: | ckan | Keywords: | |
Cc: | Repository: | ckanext-storage | |
Theme: | none |
Description (last modified by rgrp) (diff)
E.g. uploading a file with spaces in it: OECD Monthly Exchange Rates.zip
Gives a 404 Not Found response to the following file: http://test.ckan.org/api/storage/metadata/2011-12-05T193046/OECD%20Monthly%20Exchange%20Rates.zip
The upload wheel keeps spinning and the user is not informed that the upload has failed.
Analysis: turns out that google storage (possibly s3 but not checked) replaces with ' ' in keys with '+' on upload. This breaks things because we try and look up metadata about upload using the filename/key we put in but of course that does not exist because google has changed name.
Fix is trivial: replace ' ' in keys / filenames with '-'.
Change History
comment:1 Changed 2 years ago by rgrp
- Owner set to rgrp
- Priority changed from major to critical
- Status changed from new to assigned
- Repository changed from ckanext-upload to ckanext-storage
- Milestone set to current-ckan-sprint-2011-12-19
comment:2 Changed 2 years ago by rgrp
Debug via js console revealed the problem: Google storage replaces spaces with +.