update data in portal hosted layer using rest end point

123
0
10-08-2020 08:16 AM
sandhyabaratam
New Contributor

Hi Team,

I have to update gdb data in portal-> hosted feature layer using its item id. I got below rest end point to perform this.

https://<hostname>/arcgis/sharing/rest/content/users/<userid>/items/<itemid>/update

While executing below code, I am getting an error --- {ERR_INVALID_ARG_TYPE] the first argument must be one of type string or buffer.

can any one please let me know how to resolve this or any change in passing inputs etc..

var options = 

{

   file:fs.createReadstream(<fPath of gdb/zip file>),

   overwrite:true,

   f:'json',

   token:<tokenVal>,

   filename:<fname>

}

request.post( {url:<url>,formData:options}, function(err, response,body){

   ------to do--------------

});

Regards,

Sandhya.

0 Kudos
0 Replies