Uploading file to workdrive from creator

Uploading file to workdrive from creator

Hello I am trying to upload a file from creator into my zoho workdrive but it does not seem to be working.  A file does get uploaded but there is nothing when I try to look at it and just gives an error message saying "We couldn't generate a preview due to a mismatch in the file extension and the actual file format.". How would I fix this?

row.Temperature_Log is a file upload field

Deluge code in creator:
tempFile = row.Temperature_Log;
fileName = row.Temperature_Log.acualname;
activeLogFolder = "0ca1f1e84ba0689a14289829fbf6600e6ee18";
if(tempFile != null)
{
myResp = zoho.workdrive.uploadFile(row.Temperature_Log,activeLogFolder,fileName + " " + input.Customer,false,"writerconnection");
attributes = myResp.getJSON("data").getJSON("attributes");
strLocation = attributes.getJSON("Permalink");
fileID = attributes.getJSON("File INFO").getJSON("RESOURCE_ID");
row.Log_Added=zoho.currenttime;
row.Docs_Upload_ID=fileID;
row.Zoho_Docs_Temp_Log="<a href='" + strLocation + "' target='_blank' title='Docs Temp Log'>Go to Temp Log from " + row.Log_Added + "</a>";
row.File_Name=fileName;
alert "File Uploaded to Workdrive";
}