Hello,
I've added a possibility to upload a shapefile into a PostGIS database
table. Part of the code in the UploadAndProcess.java can be seen here:
http://codeviewer.org/view/code:42b9
I know that in Geonetwork version 2.10.0 it was possible to select a file
from the computer in the "Add online resource" form even if protocol
"PostGIS db" is chosen. But in 2.10.3 there is no "select file" field if I
choose PostGIS db as protocol. Only for "File for download" a file from
computer is selectable. Why has this been removed?
So I tried to add a Select-File field for PostGIS db within the
LinkResourcesWindow.js by adding the following code
items: [this.idField, this.versionField,
{
xtype: 'fileuploadfield',
emptyText: OpenLayers.i18n('selectFile'),
fieldLabel: OpenLayers.i18n('File'),
// allowBlank: false,TODO validation
name: 'filename',
buttonText: '',
buttonCfg: {
iconCls: 'uploadIconAdd'
}
},
In the online resource form I see two select file fields now. If I select a
file for upload in postGis db, I dont get an error but I can see that the
shape features haven't been uploaded into the database. If I select File for
Download and try to upload it I get a FileNotFoundException because the
access to my tmp-folder is denied (which I don't understand cause the access
to the folder is not denied). So I think I did something wrong when I tried
to add a Select-file button for all protocols in the "Add online resources"
form in the LinkResourcesWindow.js
My question is if someone managed to implement a shape feature upload to a
postgis database in the lastest versions and how I can add a button for all
protocols in the Add Online resource form, like it was in version 2.10.0
I am thankful for every advice!
Dominik
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/No-Upload-to-PostGIS-db-possible-in-Geonetwork-2-10-3-tp5156225.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.