timwaters / mapwarper

free open source public map georeferencer, georectifier and warper
http://mapwarper.net
MIT License
193 stars 80 forks source link

Upload CSV of GCPS does not work #143

Closed planemad closed 6 years ago

planemad commented 6 years ago

There seems to be a bug in the upload csv of control points. Steps to reproduce:

  1. Exported the gcps.csv from map 1
  2. For map 2 with the same dimension, I choose the csv and click upload csv
  3. The page reloads, but no control points are added
planemad commented 6 years ago

Have added each gcp individually for map 2, but should be reproducible on any map.

timwaters commented 6 years ago

Many thanks, not sure what is happening here. Will have a look - what broswer and OS are you using? it might be an encoding issue

timwaters commented 6 years ago

Looking in the logs for a successful request

Parameters: {"utf8"=>"✓", "authenticity_token"=>"xxx", "file"=>#<ActionDispatch::Http::UploadedFile:0x007f277cdf0908 @tempfile=#<Tempfile:/tmp/RackMultipart20171128-30062-mha0yv.csv>, @original_filename="gcps.csv", @content_type="application/vnd.ms-excel", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"gcps.csv\"\r\nContent-Type: application/vnd.ms-excel\r\n">, "mapid"=>"25952"}

but for the 26003 map:

Started POST "/gcps/add_many/26003" for 106.51.66.238 at 2017-11-28 11:52:34 +0100 I, [2017-11-28T11:52:34.884235 #18856] INFO -- : Processing by GcpsController#add_many_to_map as HTML I, [2017-11-28T11:52:34.884403 #18856] INFO -- : Parameters: {"utf8"=>"✓", "authenticity_token"=>"xxx", "mapid"=>"26003"}

so it appears that the file is not being uploaded correctly.