How to correctly use workdrive integration to upload file from file_upload field?

How to correctly use workdrive integration to upload file from file_upload field?

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!

      Zoho Developer Community








                                Zoho Desk Resources

                                • Desk Community Learning Series


                                • Digest


                                • Functions


                                • Meetups


                                • Kbase


                                • Resources


                                • Glossary


                                • Desk Marketplace


                                • MVP Corner


                                • Word of the Day



                                    Zoho Marketing Automation


                                            Manage your brands on social media



                                                  Zoho TeamInbox Resources

                                                    Zoho DataPrep Resources



                                                      Zoho CRM Plus Resources

                                                        Zoho Books Resources


                                                          Zoho Subscriptions Resources

                                                            Zoho Projects Resources


                                                              Zoho Sprints Resources


                                                                Qntrl Resources


                                                                  Zoho Creator Resources


                                                                    Zoho WorkDrive Resources



                                                                      Zoho Campaigns Resources

                                                                        Zoho CRM Resources

                                                                        • CRM Community Learning Series

                                                                          CRM Community Learning Series


                                                                        • Tips

                                                                          Tips

                                                                        • Functions

                                                                          Functions

                                                                        • Meetups

                                                                          Meetups

                                                                        • Kbase

                                                                          Kbase

                                                                        • Resources

                                                                          Resources

                                                                        • Digest

                                                                          Digest

                                                                        • CRM Marketplace

                                                                          CRM Marketplace

                                                                        • MVP Corner

                                                                          MVP Corner







                                                                            Design. Discuss. Deliver.

                                                                            Create visually engaging stories with Zoho Show.

                                                                            Get Started Now