[Cartoweb-users] Upload georeferenced images with Edition plugin

Igor Evdokimov igev at mail.ru
Sat Jun 16 03:27:48 EDT 2007


Hi, List!

I want to use CW edition plugin to add points on map with linked images (JPG etc).
This plugin works well (except some problems), and I want to write some additional
functionality to it.

When I try to add a point to map (to PostGIS layer), I see a table with
TEXT|INTEGER editable fields. One of my fields is named "IMAGE" and user must
enter here a relative path to this image on my WWW-server,
for example "/cartoweb/incoming/12345.jpg". It works. But I want more.

I'm new to PHP, so without any help I'll spend a lot of time on this task.

What I want:

1. Look at the sample picture. I want to add 2 buttons at "image" text field
    ("Browse"- to select file from user disk, "Upload" - to upload it to server).
    I've added them (in dhtmlEdit.js), but JS sends ERROR on
    <input type="file" value="userfile"> field (that is below 'image' text field)
    based on security reason.

2. By pressing "Upload" I want to upload selected file to server, server must
    generate new unique name to this file and return this new filename to user
    form into "image" text field without reloading main page. I know he basics
    of uploading files to server and it works, but how to attach it to CW in this
    special way?

That's all, and I hope you can help me.

Best regards, Igor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.JPG
Type: image/jpeg
Size: 10721 bytes
Desc: not available
Url : http://lists.maptools.org/pipermail/cartoweb-users/attachments/20070616/f15900bd/sample.jpe


More information about the Cartoweb-users mailing list