Factor out the URL building step from ckan_post function and use it in the latter component.
Attach a file by drag & drop or click to upload