DropBox Asset Loader

This is a Dropbox browser which lets you browse your entire dropbox and add files to Codea’s Documents folder. It also creates a spritepack file that can be used to load images from the web when sharing a project with others.

This uses @aciolino 's awesome Dropbox api which I made minor tweaks to.

Code

###NOTE

This is a very early prototype and can be buggy. I’m having an issue with the loader actually saving images on my ipad 2 but it works fine on my ipad air. Feedback is most welcome.

###TODO

–Add support for loading other files besides images.

###SETUP

  1. go to: https://www.dropbox.com/developers and log in.

2)Click on App Console on the left menu.

####Select

  • DropBox api
  • Files and data stores
  • No - my app needs access to files already on dropbox
  • Name the api access point
  1. Enter the appKey and Secret

4)Approve dropbox

###Use

  • Double tap opens a folder. Single tap selects a file.
  • Enter a name for the spritepack
  • Browse to images you would like to include in the pack.
  • Give them an import name. They will be spritepackName_filename
  • Clicking save will save the spritepack file to /apps/Codea/spritePacks
  • Clicking get link will display paste-able to include the download into your project.

###Import

If you wish to just use this to import images from your dropbox into your Documents folder then just click import. There is no need to save.

could be very useful-bravo!

‘name the api access point’ ? the choice i see is ‘provide an app name’

what should we put here?

Anything you like.

Wonder why the forum didn’t tag me on the mention…thanks for the shout out!
Nice comments in your code!

What changes did you need to make? Adding Share, Thumbnail, Meta? I see my horrible test suite is still there too, you might want to remove that.

@aciolino maybe the capital ‘A’ messed up the tag. I also changed the auth to run them all together. When the key and secret is entered it open in Codea browser. When browser is closed it fires of the call to get the user key and secret. Also removed some of the depreciated calls. Great job on the API, thank you for that.

You inspired me to create api’s for some of the more popular websites.

I’ll have to check out your changes, I don’t like how I had to get the authentication to work in the past. Maybe you improved that!

I wrote one for SkyDrive already…maybe you can improve that? :slight_smile:

:frowning: I made something very close to this a LONG time ago and never put it up…

Now I’ll put it on CC and we can see whose is best! >:)

Edit: Wait, by your entire DropBox folder do you mean EVERYTHING or only the Codea folder?

@skythecoder All of dropbox

—silence— :stuck_out_tongue:

Yeah, I now realize that your project is quite different from mine… :">

You can delete these comments if you want.

Your project’s concept seems cool, but I can’t figure out how to work it… :confused:

@skythecoder, did you create the dropbox dev account? Have you successfully authorized?

You will need a spritepack name in the text filed. From there you can select and rename images and add them to a downloader or import them into Documents.

@Briarfox I made and authorized the dev account successfully. I just couldn’t figure out what to do from there. I was kind of expecting a list of everything in my DropBox and buttons next to them to import them into a spritepack, but I now realize that would’ve been a bit too hard… At least, until SkyUI comes out.

[REMOVED]