[ckan-dev] resource absolute file path

Nigel Babu nigel.babu at okfn.org
Fri Mar 7 01:08:56 UTC 2014


It's going to be a bit messy with the old filestore. Take a look at how the
filestore does the download[1] of a file. That'll help you get a clue on
how to find the file in the filesystem. You might want to look at ofs and
pairtree documentation. Advance warning: It's not that great.

[1]
https://github.com/ckan/ckan/blob/release-v2.1.2/ckan/controllers/storage.py#L167

Nigel Babu

Developer  |  @nigelbabu <https://twitter.com/nigelbabu>

The Open Knowledge Foundation <http://okfn.org/>

Empowering through Open Knowledge

http://okfn.org/  |  @okfn <http://twitter.com/OKFN>  |  OKF on
Facebook<https://www.facebook.com/OKFNetwork> |
Blog <http://blog.okfn.org/>  |  Newsletter<http://okfn.org/about/newsletter>

 CKAN | http://ckan.org/ | @CKANproject
<http://twitter.com/CKANproject> |the world’s leading open-source data
portal platform


On 7 March 2014 06:15, Pabitra Dash <pkdash_reena at hotmail.com> wrote:

> Nigel,
>
> I am using CKAN 2.1 and the file is in filestore.
>
> Thanks,
> Pabitra
>
>
>
> ------------------------------
> From: nigel.babu at okfn.org
> Date: Fri, 7 Mar 2014 06:11:32 +0530
> To: ckan-dev at lists.okfn.org
> Subject: Re: [ckan-dev] resource absolute file path
>
>
> Hi Pabitra,
>
> Is this CKAN 2.2? Is the file in the filestore?
>
> Nigel Babu
>
> Developer  |  @nigelbabu <https://twitter.com/nigelbabu>
>
> The Open Knowledge Foundation <http://okfn.org/>
>
> Empowering through Open Knowledge
>
> http://okfn.org/  |  @okfn <http://twitter.com/OKFN>  |  OKF on Facebook<https://www.facebook.com/OKFNetwork> |
> Blog <http://blog.okfn.org/>  |  Newsletter<http://okfn.org/about/newsletter>
>
>  CKAN | http://ckan.org/ | @CKANproject <http://twitter.com/CKANproject> |the world’s leading open-source data portal platform
>
>
> On 7 March 2014 00:03, Pabitra Dash <pkdash_reena at hotmail.com> wrote:
>
> Hi All,
>
> In my extension I need to open a zip file resource within a specific
> dataset but not sure how to get the absolute file path for that resource.
>
> Thanks,
> Pabitra
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
>
> _______________________________________________ ckan-dev mailing list
> ckan-dev at lists.okfn.org https://lists.okfn.org/mailman/listinfo/ckan-devUnsubscribe:
> https://lists.okfn.org/mailman/options/ckan-dev
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140307/808d9760/attachment-0003.html>


More information about the ckan-dev mailing list