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

Add CKAN 2.8 support #35

Merged
merged 1 commit into from
Jan 8, 2020
Merged

Conversation

Zharktas
Copy link
Contributor

CKAN 2.8 migrated api to flask and file handling was changed ckan/ckan#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'

@hammadhasandogar
Copy link

@Zharktas did you find any solution to that?

@amercader
Copy link

@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?

@TkTech
Copy link
Owner

TkTech commented Jan 8, 2020

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...)

@amercader
Copy link

@TkTech yes, we've been using this patch in a project for months now and it works well, so +1 from me

@TkTech TkTech merged commit dc5ece6 into TkTech:master Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants