1. //report private key
2. privatekey = "0v4mapW***************6O2";
3.
4. //DropBox access token
5.
6. dropbox_access_token = "n94**********************pO";
7.
8. // file/folder path in Dropbox where you wish to save the file
9.
10. dropbox_file_path = "/Creator/";
11.
12. //Getting the file name
13.
14. file_name = input.File_Name+input.File_upload.subString(input.File_upload.lastIndexOf("."),input.File_upload.length());
15.
16. //Constructing the file URL
17.
18. fileurl = "https://creatorexport.zoho.com/file" + zoho.appuri + "<report_link_name>/" + input.ID + "/<file_upload_field_link_name>/download/" + privatekey + "?filepath=/" + input.File_upload;
19.
20. url = "https://api.dropboxapi.com/2/files/save_url";
21.
22. headers = "{\"Authorization\":\"Bearer " + dropbox_access_token + "\",\"Content-Type\":\"application/json\"}";
23.
24. data = "{\"path\":\"" + dropbox_file_path +file_name+ "\",\"url\":\"" + fileurl + "\"}";
25.
26. datastring = data.toString();
27. response = postUrl(url,datastring,headers,false);
Writer is a powerful online word processor, designed for collaborative work.