Closed Zharktas closed 4 years ago
@Zharktas did you find any solution to that?
@TkTech I know you mentioned plans for a new version of this extension but what do you think about merging this in order to support CKAN 2.8 (and 2.9) in the meantime?
Can you test this @amercader? I'm unable to work on this at the moment. Needs another +1 before I merge it.
(Also just really needs tests in general...)
@TkTech yes, we've been using this patch in a project for months now and it works well, so +1 from me
CKAN 2.8 migrated api to flask and file handling was changed https://github.com/ckan/ckan/pull/3884. This PR ports the change to cloudstorage.
Without it the upload would error with the following log:
Traceback (most recent call last): File "/usr/lib/ckan/default/src/ckan/ckan/views/api.py", line 288, in action result = function(context, request_data) File "/usr/lib/ckan/default/src/ckan/ckan/logic/__init__.py", line 464, in wrapped result = _action(context, data_dict, **kw) File "/vagrant/modules/ckanext-cloudstorage/ckanext/cloudstorage/logic/action/multipart.py", line 160, in upload_multipart data=bytearray(part_content.file.read()) File "/usr/lib/ckan/default/lib/python2.7/site-packages/werkzeug/datastructures.py", line 2745, in __getattr__ return getattr(self.stream, name) AttributeError: SpooledTemporaryFile instance has no attribute 'file'