CKAN:上传到数据存储区失败;资源太大,无法下载 [英] CKAN : Upload to datastore failed; Resource too large to download

查看:210
本文介绍了CKAN:上传到数据存储区失败;资源太大,无法下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试将大型csv文件上传到CKAN数据存储时,它失败并显示以下消息

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

/etc/ckan/production.ini

/etc/ckan/production.ini

要将大型csv上传到ckan,我还需要更改什么?

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

截屏:

推荐答案

该错误消息来自DataPusher,而不是CKAN本身: https://github.com/ckan/datapusher/blob/master/datapusher/jobs.py#L28 .不支持将较大的文件推入数据存储.

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. 使用 DataStore API 自己添加数据.

将我上面链接到的DataPusher源代码行中的MAX_CONTENT_LENGTH更改为更大的内容.

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

这篇关于CKAN:上传到数据存储区失败;资源太大,无法下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆