[ckan-dev] How can I restrict the formats to upload to DataStore?

David Read david.read at hackneyworkshop.com
Mon Aug 28 13:56:30 UTC 2017


Rafa,
 the "Upload to DataStore" button is display for all resources - see
resource_data.html. It would be a good idea to restrict that to ones
that the DataPusher is configured to handle. Is this something you
could code up and make a Pull Request for? I guess you would want to
run the same logic as you see in datapusher's plugin.py in the notify
method, checking the resource's format against
self.datapusher_formats. You could factor that out into a helper
function and both the template and notify could use it.

David

On 28 August 2017 at 13:44, Rafa <rafsalrob at gmail.com> wrote:
> Hi everyone!
>
> I'm a developer of Open Data Portals based on CKAN. I am currently
> developing a kind of solution using the DataStore plugin combined with the
> Datapusher. I need to restrict the file formats that can be loaded into the
> DataStore via UI. I have tried using the ckan.datapusher.formats property
> for CSV and XLS files, but the DataStore Upload button is still showing for
> all the files I upload.
> Is there any way to do this only by configuring?
>
> Thx.
>
> --
> --------------------------------------------------
> Rafael Salas Robledo
>
> _______________________________________________
> 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
>



More information about the ckan-dev mailing list