Hi
I am new ot this. Is there anyone tried to upload file to folder on box via suitescript.
I am able to create folders and sub folders but finding some issues in converting curl to suitescript body object.
I want to convert this to suite script
I tried below but having issues and also can't find anything in suitescript documentation
curl https://upload.box.com/api/2.0/files/content \
-H "Authorization: Bearer ACCESS_TOKEN" -X POST \
-F attributes='{"name":"tigers.jpeg", "parent":{"id":"11446498"}}' \
-F file=@myfile.jpg
I have tried below but returning blank object
var obj = {
'attributes': '{"name":"Capture001.png", "parent":{"id":"removed for privacy23"}}',
};
//var sobj = JSON.stringify(obj)
nlapiLogExecution('DEBUG', "OBJ", JSON.stringify(obj));
var result = nlapiRequestURL(url, obj, BOX_AUTHORISATION, "POST");