10-11-2018 03:20 AM
Hi,
is there any simple description on how to implement an upload button for vector data?
I use the "File Widget" for selection, but don't know which upload folder to address: to the warehouse folder or to the folder where all raster and vector data is stored.
Then I place an Action Widget and do not know which kind of trigger to define.
Any help appreciated,
Ruth
Solved! Go to Solution.
10-11-2018 11:40 PM - edited 10-11-2018 11:44 PM
Hi Ruth,
here is a sample in which I'm uploading files on a folder on the server. To get a complete overview of all the possibilities please check this tutorial.
This is my form configuration:
I'm uploading a file in a folder based on the ShapeFolder formfield (in my case I'm generating a unique name for the folder to have each set of files stored in different locations, but this is up to you). In the properties I've set a list of Fileextensions enabled and the possibility to upload Multiple files.
My Upload button looks like this:
IG.trigger({triggerNames:['FilePathUploadTrigger'], reloadFields:[]}) .done(function (result) { IG.getItemById('UploadComplete').setValue('Upload complete') })
When the user uploads the files the text (UploadComplete formfield) "please upload all of the files..." will be changed to "upload complete".
This is my SqlFileIteratorTrigger (method is action since I'm running it from the Upload button):
ShapeFile is the name of my File widget (the label you can see in the first image is "Files to upload").
The Sql parameter of the SqlFileIteratorTrigger is mandatory, but since we are not using the DB you can put any selection in there.
HTH,
Stefano
10-12-2018 12:54 AM
Stefano,
perfect description. Now I have it up and running!
Ruth