[ckan-dev] Creating resource with upload from an extension

Pedro G Silva pedro.gracio at deimos.com.pt
Wed Apr 27 15:51:37 UTC 2016


Hi
I have a custom extension which does some parsing on files and then adds
them to the dataset created. How should I use the field upload to pass a
file? Any ideas?

resource_dict={}
resource_dict['package_id'] = package_id
resource_dict['upload'] = ????
resource_dict['name'] = 'Product Download'
oi = plugins.toolkit.get_action('resource_create')(context,resource_dict)

-- 


[image: DEIMOS Engenharia, SA] <http://www.deimos.pt>
*Pedro Gracio Silva*
Aerospace Systems / Production Center

*Av. D. Joao II, Lt 1.17.01, 10 • 1998-023 Lisboa, Portugal*
Ph: +351 21 893 3020 • Fax: +351 21 896 9099
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160427/06fee42d/attachment-0002.html>


More information about the ckan-dev mailing list