Upload functionality

crhatt avatarcrhatt created an issue

I have a suggestion. Instead of asking to upload a .zip, is it possible to specify the .shp in the upload, and then have the code upload the .shx, .prj and .dbf? I think this would be a little better, if it were possible.

Comments (3)

  1. Dane Springmeyer

    Ya, you bet.

    I think providing both options would be ideal. If someone knows how to zip up their data then its a great asset and if they don't know how then providing the ability to upload each part of the shapefile is a must.

    The latter will be a bit error prone and tedius, but with the nice django form validation it should be pretty easy for users to fumble through it.

    An example of uploading each of the shapefile parts can be found here: http://www.naturemaps.sa.gov.au/imf-ext/imf.jsp?site=NatureMaps

    This method will simply require a second form with a FileField for each file type and validation specific to the file extension.

  2. crhatt

    I was more thinking that, as opposed to the user uploading each individual file, they only upload the .shp file, and then the code attempts to upload all the other files without the user having to do anything.

  3. Dane Springmeyer

    Hey crhatt,

    Sorry for taking ages to respond on this. I like that idea but I think its impossible given security restrictions of the browser. We can't know the file path on the users system to the file.shp and therefore, not in javascript or server-side, are we able to POST the data of the other files.

    I'd love to be proved wrong on this however :)

  4. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.