I have the following code that is used to add a shapefile to the map and it works perfectly.

var genRequest = request({
                    url: portalUrl + '/sharing/rest/content/features/generate',
                    content: myContent,
                    form: dom.byId('uploadForm2'),
                    handleAs: 'json',
                    load: lang.hitch(this, function (response) {
                        if (response.error) {

However currently it is using a form where the user has to manually select a file from on his pc. Is there any way so that instead of using the form I can pass a link which is passed through the code? I can't seem to code the form dynamically to automatically accept the link to avoid the user having the choose the file either.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.