File uploaded to Dropbox from Pipedream workflow only 30 bytes, expecting 80KB

This topic was automatically generated from Slack. You can find the original thread here.

Raymond Camden : I’ve got a new version of a workflow that was working fine before. It runs on a file uploaded to a Dropbox folder. It gets the file down to /tmp, does stuff to it, and then uploads it. for some reason when it transfers up, its only 30 bytes. ive confirmed the file is bigger (80ish K)

Dylan Sather (Pipedream) : Does the file look OK after it’s saved to /tmp? Or if you review the contents of the file, is it also 30B? Trying to determine whether the issue is on download or upload

Raymond Camden : according to fs.statSync, its 80ish k, so id think so

Raymond Camden : it seems to be on upload

Raymond Camden : my step in the middle is to use our PDF api to add a password. that runs ok

Dylan Sather (Pipedream) : Just to confirm, is the file also ~80KB after that step?

Raymond Camden : yeah, in the upload to DB step, that’s where i check size

Dylan Sather (Pipedream) : ok thanks. Mind sharing the workflow with dylan@pipedream.com? I’d like to reproduce the upload issue

Raymond Camden : invite sent

Dylan Sather (Pipedream) : I noticed in this section:

this.resp = await dbx.filesUpload({
  path: params.file_path, 
  contents: file
})

file points to the name of the file, not the contents of the file. Is that expected?

Raymond Camden : i believe so. thats what i did before… but… im not 100% sure i ever READ the final file in my last workflow

Raymond Camden : if so, thats on me - let me mod it do a quick file read

Raymond Camden : heh that was it. so my previous workflow was testing pdf optimization, so i just cared that the size went down, i never looked at the result :wink:

Dylan Sather (Pipedream) : haha gotcha, glad that worked!

Raymond Camden : i forgot to say - thank you!