I have no idea if this is supposed to go into WorkDrive or Creator forums or Deluge but I'm hoping someone can help me out either way.
So according to the information on the workdrive integration with creator to upload file (
https://www.zoho.com/deluge/help/workdrive/upload-file.html) I should be able upload something directly from a file upload field in my form on creator. (in my case it's a subform so I can have multiple product uploads) I am trying to upload the files to the corresponding folder I've made in workdrive and then clear them out of the field so they are not stored in creator and don't take up space. I have a field in each record that has the link to the workdrive folder.
My code is below. And it doesn't work. Every instance I've seen of people doing this successfully has involved using invoking the URL to get the file from the field, storing that to a variable, and then uploading that to workdrive. But that opens up security issues if I publicly share the report. Why won't it work directly with my file upload field when clearly the documentation says it will do that? Help!
filecount = 0;
for each row in Product_Documentation
{
if(row.Documents != NULL)
{
name = row.Documents.actualname;
file = row.Documents.content;
response = zoho.workdrive.uploadFile(file,input.FolderID,name,true,"irconnections");
filecount = filecount + 1;
}
}
input.Product_Documentation.clear();
info filecount + " files supposedly uploaded";
Product_Documentation is my subform, Documents is the file upload field in the subform, and FolderID is self explanatory. I have the code for the filecount in there for testing and it will go through the correct number of iterations based on what I've uploaded during testing but the files don't end up in the folder. Please help!