dropbox

Dropbox iOS SDK always returns 'YES' for isLinked:

99封情书 提交于 2019-12-04 03:49:28
I'm using the iOS Dropbox SDK and want to check if my App is already linked with a Dropbox account. So I do: if (self.isLinked) { NSLog(@"linked"); } However self.isLinked always returns YES . Even after cleaning and resetting the iPhone Simulator. This only occurs when running in the iOS simulator not on a real device. I don't know why this happens, but the Dropbox SDK on the Simulator also is linked if its host Mac is linked with a Dropbox account. To get realistic behavior in the Simulator unlink your Mac in the Dropbox Preferences. Sometime in mid-2012 (can't find the iOS SDK version log)

vimrc to be cross-platform and synced with Dropbox.

自作多情 提交于 2019-12-04 03:47:26
I'v been using vim/gVim so far in my Linux Machine, and I have a Windows machine as well. In this windows machine I'm mainly notepad++. I would like to store all my .vimrc settings and .vim folder in Dropbox, and create symbolic links in Linux pointing to them, and them do the same in my Windows machine. I have plenty of "home shortcut notation" (don't if this is the correct name) ~ in my configuration, and would like to know if writing down for example $HOME instead of ~ it's going to work: this way, I can create some symbolic links in Windows as well that points to these files (I'm using

Dropbox API v2 - trying to upload file with files_upload() - throws TypeError

一曲冷凌霜 提交于 2019-12-04 03:04:24
I have been trying to upload a simple file to dropbox using the files_upload() function in python3 Even trying out the code in the tutorial provided on Dropbox's site I get an error and I don't understand why. What am I missing here? Here is my code: import dropbox dbx = dropbox.Dropbox("my_access_token") data = "asd" dbx.files_upload(data, '/file.txt') And here is the error message I get when I try to run it: Traceback (most recent call last): File "dbox.py", line 7, in <module> dbx.files_upload(data, '/file.txt') File "/usr/local/lib/python3.4/dist-packages/dropbox/base.py", line 1225, in

How to perform Segue in AppDelegate?

随声附和 提交于 2019-12-04 01:20:01
I am trying to complete an application on IOS 5.1 with Storyboard. Basically I am doing a dropbox app. Since I am using Dropbox SDK link to Dropbox is handled in AppDelegate.m. User has the option of be able to unlink from a session and link again in different View Controllers. So every time user link and unlinked app has to switch view from Appdelegate to a view controller that is unconnected to rootviewcontroller In original Dropbox's example Dropbox handled transition like following code - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { if ([[DBSession

Is it legitimate to use dropbox as file storage for my site?

 ̄綄美尐妖づ 提交于 2019-12-04 00:14:28
I am approaching the limits of my hosting plan. I doubled it once from 2 to 4 GB and my site (a popular woodworking community in Hebrew) is getting close to using the disk space available for the images people are uploading. I was wondering if it were a legitimate use of DropBox (or any of the other free cloud hosts), to serve the files of it as public files... i.e. whenever someone uploads a file to my server it will be instead uploaded using the DropBox API to the DropBox servers, and the Public LINK to the file will be stored in my DB and served to the users. Another option would be to

Upload website + database to dropbox with PHP

烈酒焚心 提交于 2019-12-03 21:17:51
Does anyone know, if it's possible to backup my website and database to a dropbox account with php or something? And if it's possible, how can I do it the best way? :-) Best Regards Simon Yes it is, have a look at the dropbox-php . Example Code from the documentation: /* Please supply your own consumer key and consumer secret */ $consumerKey = ''; $consumerSecret = ''; include 'Dropbox/autoload.php'; session_start(); $oauth = new Dropbox_OAuth_PHP($consumerKey, $consumerSecret); // If the PHP OAuth extension is not available, you can try // PEAR's HTTP_OAUTH instead. // $oauth = new Dropbox

How to upload image, which is not saved on the device to the dropbox account?(IOS)

倾然丶 夕夏残阳落幕 提交于 2019-12-03 21:05:27
Dropbox restClient saves only files. So i want to save the image in local folder first and then to upload it, as a result it saves file, but it is corrupted. NSString *localPath = [[NSBundle mainBundle] pathForResource:@"Info" ofType:@"plist"]; NSString *jpegFilePath = [NSString stringWithFormat:@"%@/test.jpeg",localPath]; NSData *data2 = [NSData dataWithData:UIImageJPEGRepresentation(image, 1.0f)]; [data2 writeToFile:jpegFilePath atomically:YES]; NSString *filename = @"test.jpeg"; NSString *destDir = @"/"; [[self restClient] uploadFile:filename toPath:destDir withParentRev:nil fromPath

Sync core data database/ .sqlite file to Dropbox

杀马特。学长 韩版系。学妹 提交于 2019-12-03 21:02:24
I'm trying to sync/upload my core data database/.sqlite file to dropbox. once my user logs in, i have a button to upload the file: -(IBAction)sync{ NSString *localPath = [[NSBundle mainBundle] pathForResource:@"cache" ofType:@"sqlite"]; NSString *filename = @"cache.db"; NSString *destDir = @"/"; [self.restClient uploadFile:filename toPath:destDir withParentRev:nil fromPath:localPath]; } But the problem here is: I dont know the name of my .sqlite data base, I've looked under : ~/Library/Application Support/iPhone Simulator/<SDK>/Applications/<UUID>/Documents/bc.db //I have looked into every

Evaluation of a strategy to sync Core Data with Dropbox

六眼飞鱼酱① 提交于 2019-12-03 17:26:26
This question is about using Dropbox to sync an sqlite Core Data store between multiple iOS devices. Consider this arrangement: An app utilizes a Core Data store, call it local.sql , saved in the app's own NSDocumentDirectory The app uses the Dropbox Sync API to observe a certain file in the user's Dropbox, say, user/myapp/synced.sql The app observes NSManagedObjectContextDidSaveNotification , and on every save it copies local.sql to user/myapp/synced.sql , thereby replacing the latter. When the Dropbox API notifies us that synced.sql changed, we do the opposite of part 3 more or less: tear

Launch Dropbox from my app Android

偶尔善良 提交于 2019-12-03 14:17:52
问题 I want to call the dropbox app in my app Android using the Intent. What I have to do??? Thanks!! 回答1: Try using PackageManager and getLaunchIntentForPackage() with the package name for DropBox, i.e com.dropbox.android . You will get a PackageManager.NameNotFoundException if Dropbox isn't installed. 回答2: If what you want is to share a file by lauching dropbox , you can use ACTION_SEND : Intent intent = new Intent(Intent.ACTION_SEND); startActivity(Intent.createChooser(intent, "title"); you can