DropboxAPI_2 by McCarthy - SOLVED

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
nicoloose
Posts: 99
Joined: Mon Sep 16, 2013 3:35 pm

DropboxAPI_2 by McCarthy - SOLVED

Post by nicoloose » Wed Jun 06, 2018 7:32 am

Thanks to the author of DropboxAPI_2 for the great stack with examples. I have everything working great except one thing I don't quite get.

I have written a desktop app for my business and part of it is to attach files to projects which I have achieved with dropbox. I need the users to be able to have a preview of the files on the server

Some users user windows while others use mac, some files are PDF which is not supported. In your opinion, what would be the best way of doing this? I see there is function for previewing the files but I can't find an example of how to do this. So far I have this code:

Code: Select all

put DropBoxPreview(tAouth2accesstoken,tFileToView) into tResult

Code: Select all

function DropBoxPreview pAouth2accesstoken,pPath
   set cursor to watch
   put fGetDropboxPreview(pAouth2accesstoken,pPath) into tResult
   put it into tResult
   return tResult
end DropBoxPreview
And this is where I am getting stuck...... I don't know what to do with tResponse? If the document is a PDF what is the best method of handling it?

Code: Select all

function fGetDropboxPreview pAouth2accesstoken, pPath
   put db2_get_preview(pAouth2accesstoken,pPath) into tResponse
   if "error" is in tResponse then
      beep
      return tResponse
   end if
end fGetDropboxPreview

nicoloose
Posts: 99
Joined: Mon Sep 16, 2013 3:35 pm

Re: DropboxAPI_2 by McCarthy - SOLVED

Post by nicoloose » Wed Jun 06, 2018 2:07 pm

Since this is an in-house application, I have decided to limit what files can be viewed. I have also created a widget browser and am able to view files from DropBox with ease using DropBoxAPI_2

Post Reply

Return to “Internet”