[ckan-dev] File size
Alex Gartner
alexandru.gartner+ckan at gmail.com
Thu Nov 5 22:57:05 UTC 2015
Hello,
I was digging a bit into how to store and show the file size to the user (
for uploaded resources ). As I see CKAN doesn't automatically populate this
field although it exists in the database and it is editable via the API.
At this moment it seems to me that the simplest solution would be to get
the file size via js in the browser ( modern browsers seem to support this
) and send it to the server with the resource form. The downside is that
the client ( whether we're talking about a browser or an API client) could
potentially send the wrong size information.
Is there a better way of doing this on the server side ? I checked a bit
the code and to me it seems kinda hard to find out the size before the
resource is created.
Has anybody already dealt with this issue ?
Thank you,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20151106/8013c825/attachment-0002.html>
More information about the ckan-dev
mailing list