Uploads added to Zoho WorkDrive by Zoho Creator can not be read or viewed

Uploads added to Zoho WorkDrive by Zoho Creator can not be read or viewed

We created a form. That form contains a subform with File Upload Fields. Files get uploaded and shown in the report. We created a Deluge Script that uploades these files to Zoho Work Drive into separate folders depending on the clients name.
It works fine until this point as the files are getting uploaded separately into Zoho WorkDrive:
The problem starts when we try to view them. All of them have take just 1Kb of storage. Images show this error:

And uploaded TXT files in its content just have the name of the file instead of what's suppose to be there.

The code we use to upload looks as followed:
  1. test=zoho.workdrive.createFolder(input.nazwaprojektu,"5okrr0b3a977c3be043c4b9872aeb22803603","workdrive");

  2. for each  temp1 in Rysunek_pomiarowy1
  3. {
  4. temp2 = temp1.UploadRysunek.actualname;
  5. zoho.workdrive.uploadFile(temp2,"5okrr0b3a977c3be043c4b9872aeb22803603",temp2,false,"workdrive");
  6. }
What are we missing? Thanks!