Agares
Agares

Reputation: 21

Change CKAN Resource URL Max Length

Can we change max character length for ckan resource url? URL Resource in CKAN

Notes: my team is adding data using API url directly that's why they need longer url. If you have better method please do tell, very much appreciated.

Upvotes: 2

Views: 122

Answers (1)

Tony Dex
Tony Dex

Reputation: 56

AFAIK, there are no restrictions on resource's URL field(except for the PostgreSQL's text type).

For example, that's how you can create a resource with a "URL" that consists of 2000 a(using ckanapi):

ckanapi action resource_create \
    package_id=statistics-contact \
    url=$(head -c 2000 < /dev/zero | tr '\0' 'a')

If you want to set the upper bound on the maximum allowed length for URL, you have to customize resource's schema(or use ckanext-scheming).

Upvotes: 2

Related Questions