mergDropboxDownload example

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: mergDropboxDownload example

Post by Mikey » Sun Aug 06, 2017 2:50 pm

Joe, if you're familiar with git, submit a pull request to my repo. If not, please submit an issue and I'll have a look. Also please post back here with the LC bug report number.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7228
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: mergDropboxDownload example

Post by jacque » Sun Aug 06, 2017 4:47 pm

I had some problems with the use of:
put it into URL ("file:myDownloadedFile.txt")
Your solution works fine, but for future reference, the issue wasn't in the Dropbox extension but rather in the use of "file:" as the URL designator. That only works with text files. If you need to work with binary files, use "binfile" :

"binfile:myDownloadedFile.txt"
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

rcmills
Posts: 42
Joined: Wed Nov 21, 2018 8:27 pm

Re: mergDropboxDownload example

Post by rcmills » Wed Jul 24, 2019 7:47 pm

I read this post with great excitement, as I have been trying to upload files to Dropbox from an iOS app. Unfortunately this doesn't seem to be implemented in the iOS environment. Is there any way to do it?

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: mergDropboxDownload example

Post by Mikey » Wed Jul 24, 2019 7:59 pm

Our apps use this on ios literally constantly.

rcmills
Posts: 42
Joined: Wed Nov 21, 2018 8:27 pm

Re: mergDropboxDownload example

Post by rcmills » Wed Jul 24, 2019 10:18 pm

I am using LC 9.0.1 Build 15103 - do I need to update?
Or do I need to include any library or anything in my iOS build?

Here is my relevant code:

Code: Select all

   put dbToken into pAccessToken
   put "overwrite" into pMode  
   put False into pAutorename  
   put true into pMute 
   
    get hiliteData
    put "Update:" && the seconds into line 1 of it
    replace cr with "###" in it  -- because Dropbox doesn't return any cr's when I download
      
    put "/hiliteData.txt" into pPath	
    put it into pData 
    dropboxUpload pAccessToken, pPath, pMode, pAutorename, pMute, pData 
    
I get an error message "can't find handler".

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: mergDropboxDownload example

Post by Mikey » Thu Jul 25, 2019 12:06 am

in Standalone settings go to inclusions and add the Dropbox library.

rcmills
Posts: 42
Joined: Wed Nov 21, 2018 8:27 pm

Re: mergDropboxDownload example

Post by rcmills » Thu Jul 25, 2019 12:28 am

Many thanks!

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: mergDropboxDownload example

Post by Mikey » Thu Jul 25, 2019 12:36 am

Don't thank me until you have it running...

rcmills
Posts: 42
Joined: Wed Nov 21, 2018 8:27 pm

Re: mergDropboxDownload example

Post by rcmills » Thu Jul 25, 2019 1:37 pm

I do, and it works well!

Post Reply

Return to “Talking LiveCode”