CKAN : Upload to datastore failed; Resource too large to download

天涯浪子 提交于 2019-12-10 15:39:52

问题


When i try to upload a large csv file to CKAN datastore it fails and shows the following message

Error: Resource too large to download: 5158278929 > max (10485760).

I changed the maximum in megabytes a resources upload to

ckan.max_resource_size = 5120

in

/etc/ckan/production.ini

What else do i need to change to upload a large csv to ckan.

Screenshot:


回答1:


That error message comes from the DataPusher, not from CKAN itself: https://github.com/ckan/datapusher/blob/master/datapusher/jobs.py#L250. Unfortunately it looks like the DataPusher's maximum file size is hard-coded to 10MB: https://github.com/ckan/datapusher/blob/master/datapusher/jobs.py#L28. Pushing larger files into the DataStore is not supported.

Two possible workarounds might be:

  1. Use the DataStore API to add the data yourself.

  2. Change the MAX_CONTENT_LENGTH on the line in the DataPusher source code that I linked to above, to something bigger.



来源:https://stackoverflow.com/questions/23216804/ckan-upload-to-datastore-failed-resource-too-large-to-download

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!