+175
Completed

Dropbox Support

Alexander Blach (Developer) 13 years ago updated 12 years ago 37 1 duplicate
There are several ways how Dropbox support could be implemented:

1) Allow to login to your Dropbox account and mark one ore more folders to sync with Textastic. Files would be downloaded to the iPad and uploaded automatically when they are changed.

Pros: works offline
Cons: uses a lot of space, sync is not easy to get right (need to handle conflicts)

2) Instead of syncing one or more folders, let the user connect to Dropbox and upload or download files.

Don't sync files automatically but behave more like an ftp client.

Pros: Access to the whole Dropbox, Works offline
Cons: No immediate upload on file changes, Need to do it manually

3) Like in the Dropbox app, have access to the whole Dropbox folder and keep a local cache of the directory structure. Allow to download and edit all files when online. Changes would be uploaded as soon as you close a file (or periodically, depending on API limits).

Keep a local cache of recently opened files – in case your internet connection is lost, you can still view those files.

Have the ability to mark files as "favorites" to get a local copy.

Pros: Access to the whole Dropbox, Files in the Dropbox are always up-to-date, You can select which files you want to keep offline
Cons: -

Answers

Answer
Completed
I implemented #2 for Textastic 2.0 because I could use the same interface as for the FTP client.
Answer
Under review
There is also another idea: "Upload and Download Files from and to Dropbox". Be sure to vote only for the feature variant you want to have implemented.
Duplicates 1
Answer
Under review
There is also another idea: "Upload and Download Files from and to Dropbox". Be sure to vote only for the feature variant you want to have implemented.
I would prefer option 1. But it would be great to have also option 2. Well, and please consider to implement the same for iDisk.
+1
I would prefer a mixture of 1) and 2)
- I can add and edit files/folders local and upload them to my Dropbox.
- The other way, I can download files/folders to Textastic and have a local copy for offline editing.
   But if there is a network connection available, they should get synced.
- Support for files _and_ folders would be nice - normally you just edit one file, like som notes or a letter,
   but if I want to have e.g. a whole XCode project or a Website project in Textastic, you don't want to sync every
   file manually, instead sync the whole folder.


3) is nice, but iPad is designed for mobility, and if you don't own an iPad 3G and don't have WiFI around, you're not able to edit your files.


If Dropbox is implemented, please don't set a fix base directory, like /Textastic :-/
I like my Dropbox organized and there are lots of Dropbox tools around, which set their own base directory. After some time your Dropbox is messed up with many different directories. I, as a user, want to decide on my own, where to store my files.


Anyway, awesome work on Textastic!!! :-)
+5
Actually I think, option 3 isnt described correctly. The Dropbox App DOES allow you to download files. You can mark them as "favourite" which means you get a local copy. And I would definitively prefer this option: You would see the directory tree of your DropBox but you can choose for each file if you want to have it locally or not.

In this way you would
- sync directly with the DropBox
- could edit while offline
- wouldn't have to replicate the directory structure of your DropBox
- use as little space as you wish

I'd like that :)

P.S.
Just did a few tests with the DropBox App - switching of WiFi does not take the directory structure away from the DropBox app. You still can view all things I viewed before while online. When trying to view something not viewed before, it complaints that there's not internet connection. But I am even able to view PDF files offline which I did not mark as favourite; the app has a cache for a few documents, I guess.
Thanks for pointing that out, Erik. I have updated the text. I didn't know that the Dropbox app caches the directory structure and recently opened files.
I would prefer option 1 as most other iPad apps are doing this.
Implementing option 1) would be a whole lot easier if the Dropbox API supported sync out of the box.

Is anyone aware of an existing sync implementation for the Dropbox iOS API with source code available?
Have you looked at the work that NebulousNotes did and the code they made public for interacting with DropBox?
Yes, I had a look at it recently. Thanks for mentioning!
Option 1 or 3 (or both) would be good. It would be nice if option 3 allowed you to mark a whole folder as a favorite so that it is downloaded, rather than having to mark every item in the folder.
+1
I'd definitely opt for number 3. All others introduce too much hassle in managing files.
+1
I just bought this app to show my support to the developer of textastic even though this app is not quite usable for me without dropbox support.
  I currently use both droptext and plaintext on my iPad to edit code in my dropbox and both support option three as described and this option works wonderfully whether or not an iPad has an Internet connection. I'd love to use textastic instead of the apps I've mentioned since those apps don't highlight syntax.
I reckon #3 is the only way to go. Then if you have a website/app in a folder in your Dropbox, you could select the entire folder and store that offline. Would be perfect, because you'd have all the files you *need* on the go and ready to edit.
I'd really like to see option 1 or 2. As some other users have already mentioned, being permanently online is only possible for 3G iPads; having only the WiFi version, I would like to keep some files local on the Pad and edit them on the go. As soon as I have online access I can sync the files with Dropbox.
However, having access to Dropbox would be great!!
That's actually possible with 3). You can edit the recently opened files or mark a whole folder to keep a local copy of it.
Ok, then more general: 1, 2, or 3, as long it's Dropbox with local copies :) As there seems to be a trend towards option 3, I'd second this one.
#3 sounds great, although #1 would be fine. #2 sounds like a drag, but better than nothing. Looking forward to it, textastic is my favorite iPad code editor, and Dropbox support is my most-desired feature!
#3 would be fine for me. Github pull-edit-commit-push would be even better tho :)
Option three is the ideal, the others are better than nothing.
I would prefer option no. 3 I think this would be fantastic!
Option 3 seems like the best idea to me. I also could live with option 2, I guess.
Please just implement it - I don't care whatever version you choose (however, I'd prefer 3 and dislike 2), as long as it is there.

Currently, Textastic is the only editor with usable syntax highlighting, but I can't use it since it doesn't sync with Dropbox :-/
Option 3 seems like the most ideal.

I use dropdav.com to connect iwork to my dropbox using webdav. All that is needed is the ability to connect to a webdav server. It might not be the most elegant solution for file management however. But seems simple enough to implement.
Interesting. But, I plan to implement both a WebDAV (also for iDisk) and a Dropbox client.
The nice thing about #2 is that if you are working on a file, your half baked changes are not uploaded until you are done editing. It kind of depends on what the uploaded files represent. I guess if someone needs the css and image folders locally available for the web preview to work, then you would need to download those files too. Since editing on the iPad is usually open to distractions and missteps, I would not want to automatically upload, ever.

Also #2 could be done for single files using UIDocumentinteractioncontroller in a few lines of code.

I think (or rather know) that it is absolutely crazy for 10 different editing applications to all have custom code in them to talk to DropBox, iDisk, etc. In the end it will create a user nightmare, as for instance all the web dav interfaces will be slightly different from Pages to Textastic, etc. I would rather that Alex spend time on writing you know - the EDITOR, instead of 12 different export/import methods.
+2
I implemented #2 for Textastic 2.0 because I could use the same interface as for the FTP client.

I plan to add a feature that saves information about the used connection when you upload or download a file:

Say, you downloaded a file from your Dropbox. Textastic then saves the remote path and the connection used for the download. This creates a "link" between the local and the remote file.

You can then upload the file or download a newer version of the file with just one or two taps!

The cool thing is, that this works for Dropbox AND FTP and any other type of remote connection I might add in the future.
Answer
Completed
I implemented #2 for Textastic 2.0 because I could use the same interface as for the FTP client.
Just tried it out, and Dropbox works exactly like a dumb FTP server. Which is ok, but not quite ideal.

One thing I'd really like is a simple filter to exclude directories like .hg, .svn, CVS, etc. To give you a use case, the workflow I'm thinking of is something like this:

- Create a Dropbox folder called "textastic-source".
- Put various source tree checkouts in there.
- Tell Textastic to grab that entire folder, excluding the VCS metadata.
- Make changes with Textastic.
- Upload only the changed files. (I don't want to upload each individual file after I change it)
- I'll take care of the scripts that actually commit the changes to the VCS.

That's about it. If you can use the Dropbox API to intelligently sync changes back from the server (ie, don't re-download identical files), that'd be a bonus.
+1
Thanks a lot for version 2. The DropBox & FTP support is great! One small thing however, is that it seems that "Upload This File" doesn't always save the file first. I have uploaded a file using this method, then checked using the DropBox website and the file was not updated. Selecting another file in Textastic and going back to the first one and reuploading it worked. It may just have been connection issues, but it did all look like it had worked, except that the upload didn't seem to take.

Uploading all changed files in one go would be great too!

Thanks again.
I just had a look at the source code, and the file changes are saved before the action sheet is displayed. You got me worried for a second :)

I don't know what happened there. If there were connection issues, you would have gotten an error message (if you didn't press the cancel button in the file transfer screen).

I just tried to reproduce the issue by adding a character to a file and immediately uploading it to my Dropbox, but it always worked...
Sorry :). I have just tried it again myself and it is working now, but something failed the first few times, honest! Ah, maybe when I did it I actually hadn't made any real changes (or had made some but undone them) so that DropBox didn't count it as an update. That could have been it, though I am fairly sure I had made some changes at the time, but all my current tests are workng fine.

Sorry for wasting your time.
No problem. I'm glad it's working now :)
+2
I just downloaded this app and it is amazing!! I agree with Mark that having a way to upload all changed files with one tap would be awesome. Or the ability to select a folder for upload and have it only upload the changed files (currently it says that it will overwrite all the files rather than just the changed files). This would really be great. But all in all its quite a fantastic app! :)
+1
Here's my story: First I found PlainText, which was barebones as far as a text editor but boasted dropbox support, and was free. It lets you create a folder within your Dropbox account and work inside it (option #1 I think). I pined for a robust editor for coding, and voila! I discovered Textastic. I didn't expect syntactical language support, but to at least be able to view code rightly was wonderful. However, as I found out, this app doesn't sync; rather you have to download and upload each file individually. So I've got two apps that do part of what I'm looking for.
So I guess that's to say the full Dropbox support is possible, and if you had it, this app would be the greatest thing since sliced bread. Hope you are able to figure it out.
+1
Option "2" is a good start, but for me to find Textastic useful, I'd really need option "1". ReaddleDocs does opton '1", and it really made difference between an App I love and use all the time, and an App that I find annoying and inconvenient.

I realize that handling conflicts might be difficult or risky, so... A simple answer might be to have it "check out" (ie, redownload) a file when you open it, and "commit" the file when you tap a "save" button (and also when you change which file you are editing?).

The only problem this leaves is... What to do when the user wants to work offline (ie, has no internet connection)? For simplicity, we might assume that if the user is editing the file, then he/she wants to use that copy of the file as the latest (even though we are offline and can't download).

Then when he/she connects, just overwrite - ignore any conflict resolution. Or, you could do a very simple conflict resolution, that just checks the iPad file minus the user's edit (diff) since the last connect. If they don't match, you could give a warning.

My point is that you can deal with conflicts in some simple way that does not require you to code a complex diff tool unix diff, TortoiseSVN, or WinMerge.

Or, you could just copy what another iPad app does for DropBox sync, such as Elements. Elements is similar to Textastic, but it doesn't have syntax highlighting.
+2
I want to echo some of the sentiment that's been discussed. My experience matched best with Patrick Byers. Loved sync support of plaintext, but wanted a better keyboard and markdown preview support...then found Textastic! I paid ten bucks, but once I uncovered the difference in dropbox support between the two apps, I was a little disappointed with my purchase. Great app, but if it had folder dropbox syncing, I wouldn't be able to stop talking about Textastic. Looking forward to more about this! Can we open a ticket specifically with version 1 (or 3)? Cheers.
+4
I know this is an old thread, but I too wanted to echo the request to enable automatic Dropbox syncing.  I want to use Textastic for both coding and writing, and I love the automatic syncing in Elements and Notesy.  Can we re-open this or open a new request for automatic syncing?
Thanks, added my voice to that chorus :)