DropboxAPI_2 by McCarthy - SOLVED
Posted: 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:
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?
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
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