[GeoNode-users] layer upload questions

Simone Dalmasso simone.dalmasso at gmail.com
Thu Aug 27 23:39:09 PDT 2015

Hi Charles, I tried locally and both the console.log and the data.append
works for me, I get both the console output and the form entry added to the
http POST request.
You will have to modify also the upload view as it doesn't accept the
category as it is.

2015-08-27 22:27 GMT+02:00 Charles Cossé <ccosse at gmail.com>:

> Hello,
> I'm trying to modify the layer upload process to require the user to
> choose a category when uploading.  I've got most of the pieces in place and
> working except I'm having difficulty actually adding the selected category
> to the post.
> As the simplest of all tests I'm just trying to append a stringified input
> element to form_data in LayerInfo.js ... like this:
>         //existing code:
>         form_data.append('charset', $('#charset').val());
>         //my attempt to hardcode a category id
>         form_data.append('category','21');
>         console.log("category added to form data");
> So I admit that I'm confused ... alerts don't seem to work and console.log
> doesn't seem to work ... are they disabled somewhere?  I've tried many
> other approaches ... the above seems like it should work but no ... so I'd
> be grateful for someone's input ... any input.  Thank you!
> Charles
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20150828/eb21af62/attachment-0001.html>

More information about the geonode-users mailing list