Dropbox Help

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Jamie37
Posts: 53
Joined: Sat Dec 19, 2015 1:45 pm

Dropbox Help

Post by Jamie37 » Mon Jan 25, 2016 12:19 am

Hello,

Im currently undertaking a college project and I need to do something but have no idea how to and hopefully somebody can help.

What I need to do it have input field on a stack in livecode (For example name, date etc.) and then when a button is pressed, for livecode to create a text file and upload it to dropbox. Im not sure if this is possible and if it is, I really need some help.

Many Thanks
Jamie

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Dropbox Help

Post by Simon » Mon Jan 25, 2016 7:31 am

Hi Jamie,
What research have you done on Dropbox's API?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

Re: Dropbox Help

Post by Thierry » Mon Jan 25, 2016 8:28 am

Jamie37 wrote: .... upload it to dropbox.....
Hi Jamie,
This might give you some useful information:

http://forums.livecode.com/phpBB2/viewt ... =4&t=12549

Good luck,

Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!

Jamie37
Posts: 53
Joined: Sat Dec 19, 2015 1:45 pm

Re: Dropbox Help

Post by Jamie37 » Wed Jan 27, 2016 1:03 am

Hi,

Thank you both for your suggestions. I have had a play about but wouldn't know where to start. I ideally want it as simple as possible. Thierry, thank you for your link. I have looked at this previously but to honest, don't have a huge understanding. Like I mentioned, I do not really need it too complicated (Unless it is :P )

Again, thank you for your suggestions

Thanks
Jamie

gmccarthy
Posts: 62
Joined: Sat Feb 17, 2007 4:56 am
Location: Australia

Re: Dropbox Help

Post by gmccarthy » Thu Feb 25, 2016 2:53 pm

gmcrev

Jamie37
Posts: 53
Joined: Sat Dec 19, 2015 1:45 pm

Re: Dropbox Help

Post by Jamie37 » Fri Mar 04, 2016 11:50 pm

Thanks for the reply and the great example stack!

However, Ill be honest, i'm really struggling to understand how it works and cannot actually get it to work. I just want to write and read files and would rather leave the other stuff if possible. Sorry to be so un knowledgeable but this is a vital part of the project so need to get it working and to a point where I understand it.

Thanks
Jamie

gmccarthy
Posts: 62
Joined: Sat Feb 17, 2007 4:56 am
Location: Australia

Re: Dropbox Help

Post by gmccarthy » Sat Mar 05, 2016 12:02 am

In my stack click on the top left check box to show the steps to get dropbox setup for use.
Then, in the top right there are arrow buttons to go to the next cards that demonstrate copying files to and from dropbox.
gmcrev

Jamie37
Posts: 53
Joined: Sat Dec 19, 2015 1:45 pm

Re: Dropbox Help

Post by Jamie37 » Sat Mar 05, 2016 5:08 pm

Ok thanks for that. I am using the library from this thread: http://forums.livecode.com/phpBB2/viewt ... =4&t=12549

It work fine and i can log in and so on. The problem is that I do not want to log in every single time I launch the app and for it to log in automatically which I cannot work out how to do.

Thanks
Jamie

gmccarthy
Posts: 62
Joined: Sat Feb 17, 2007 4:56 am
Location: Australia

Re: Dropbox Help

Post by gmccarthy » Sat Mar 05, 2016 9:40 pm

My library in this thread uses the latest dropbox library: version 2.
If you set up an app in dropbox and generate the code on the dropbox site as per the instructions in my stack and paste it in somewhere in your stack, you no longer need enter passwords, login etc. There is a similar technique for the library your are using, but you will have to ask someone else for that.
gmcrev

Jamie37
Posts: 53
Joined: Sat Dec 19, 2015 1:45 pm

Re: Dropbox Help

Post by Jamie37 » Mon Mar 07, 2016 7:24 pm

Hi gmccarthy,

Thank you so much for your help! I now have a working dropbox API thanks to you.

Thanks
Jamie

Jamie37
Posts: 53
Joined: Sat Dec 19, 2015 1:45 pm

Re: Dropbox Help

Post by Jamie37 » Mon Mar 14, 2016 10:52 pm

Hi gmccarthy,

Sorry to bring up an old topic. I have a new question though. The file list folder obviously list the file names within a certain folder. What I need in my app is to have the file listed in a text field or just on a card (Either would do) and then for these file names to be clickable. Once one of them is clicked I would like it to go to a new card and fill some fields with the information from the file selected.

I am able to fill fields from a text file that is permanently written into the code but would have no idea how to do the above. If you or anybody else could help, it would be great and a massive help.

Thanks
Jamie

gmccarthy
Posts: 62
Joined: Sat Feb 17, 2007 4:56 am
Location: Australia

Re: Dropbox Help

Post by gmccarthy » Tue Mar 15, 2016 6:52 am

Are you referring to files on your hard drive or files in a dropbox?
gmcrev

Jamie37
Posts: 53
Joined: Sat Dec 19, 2015 1:45 pm

Re: Dropbox Help

Post by Jamie37 » Tue Mar 15, 2016 12:23 pm

Hello,

Sorry for not clarifying. They are from Dropbox.

Jamie

gmccarthy
Posts: 62
Joined: Sat Feb 17, 2007 4:56 am
Location: Australia

Re: Dropbox Help

Post by gmccarthy » Tue Mar 15, 2016 12:40 pm

Set the field as a list field: check Autohilite and listbehaviour in the property inspector.
The mousedown handler needs to get the hilitedtext when clicked.
You need to use Files-download from the dropbox library to get the text of the file from dropbox.
gmcrev

Jamie37
Posts: 53
Joined: Sat Dec 19, 2015 1:45 pm

Re: Dropbox Help

Post by Jamie37 » Tue Mar 15, 2016 1:39 pm

Ok, I have managed to do what you have suggested but the problem is. How do I put the "Header_files-download" fld into code and have it use a variable as the path. I have put the hilitedtext of the list field into a global variable "gSelectedFile" and would need to put that as the path i'm guessing?

Jamie

Post Reply

Return to “Internet”