garethlatwork/quickbase_client

Uploading files using the SDK doesn't work

Closed this issue · 1 comments

While I am able to successfully add or edit records in QuicKbase using this SDK, when it comes to uploading files it doesn't work. If I specify the name of the file, all that happens is a text file is uploaded with the name of the file itself as the contents. But the name of the file is the original file name. For ex., if I upload a file called resume.doc with my resume, a file called upload.doc is uploaded but the contents is upload.doc. When I download the file that was uploaded, word can't read it. It says it is a corrupted file, When I open the upload.doc file with a text editor, it shows upload.doc as the contents. I tried with the AddFieldValuePair call, then subsequently calling the addRecord call. I tried the uploadFile call. The same thing happens, no matter what I do.

Can someone fix this or show me the correct way to upload a file?

No. My bad. The 3rd parameter is indeed just the name of the file to show and the last parameter is the name of the actual file. I misread the documentation and when I tried it with the correct way, it works like a charm!