dropbox-api

AttributeError: 'tuple' object has no attribute 'read'

泄露秘密 提交于 2019-12-12 01:05:28
问题 I have got this code's lines: import dropbox #some lines for initialize API's download = self.client.get_file_and_metadata(selected_path) current_working = os.getcwd() out = open(current_working+self.filename,'w') out.write(download.read()) out.close() where 'selected_path' is the path where there is the file I want to download and 'current_working' is the path where I want to save the file. When I run the script, I retrieve this error: AttributeError: 'tuple' object has no attribute 'read'

Upload file to Dropbox from Android application

旧巷老猫 提交于 2019-12-12 00:28:15
问题 I am trying to upload a text file to Dropbox. The authentication works fine, but when it tries to upload the file, the application crashes. here is my code public class Dropboxupload extends Activity { final static private String APP_KEY = "KEY"; final static private String APP_SECRET = "SECRET"; final static private AccessType ACCESS_TYPE = AccessType.APP_FOLDER; private DropboxAPI<AndroidAuthSession> mDBApi; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate

Unable to get data from Dropbox in IOS

落爺英雄遲暮 提交于 2019-12-11 23:05:03
问题 I am working on IOS application.Integrated Dropbox successfully and saving data as record in datastores in DropBox as well.It was fine till here.But I am unable to get data after deleting application and reinstalling it.But in one scenario I am getting data i.e,"I inserted a record in any one of the tables in datastores,after inserting that when I am trying to get data Its coming successfully".But I need to get for the first time as the app installs.If any one worked on it please help me

sync txt file in internal storage with txt file in dropbox dropbox api

亡梦爱人 提交于 2019-12-11 19:44:14
问题 I want to sync a txt file in android internal storage (or sdcard for that matter) and have it automatically sync to a txt in my dropbox. i've used dropbox api but don't have hold on on how to achieve this. help needed please. Update: Here's my function to get the txt content to LogCat for now: public void getFromDbx(){ try { mDbxAcctMgr.startLink((Activity)this, REQUEST_LINK_TO_DBX); final String TEST_DATA = " Database does not exist yet"; final String TEST_FILE_NAME = "data.txt"; DbxPath

Upload Video File on Dropbox in Objective C [duplicate]

烂漫一生 提交于 2019-12-11 19:15:44
问题 This question already has answers here : File upload failed while uploading into dropbox in iOS in CoreApI (2 answers) Closed 3 years ago . I want to upload video file from local directory to DropBox.I had create a instance.Also My video file is no more than 3 MB. @property (nonatomic, strong) DBRestClient *restClient; and this is my code (After converting to data I saving locally and uploading it.) : NSData *data = [NSData dataWithContentsOfURL:self.videoURL]; //this is my local video URL

Dropbox API Redirection Loop

*爱你&永不变心* 提交于 2019-12-11 19:02:19
问题 I am using php sdk provided by Dropbox Core API. I have a minor bug... My file is being redirected all the time even I click on the allow button... Below is my index file: index.php <?php session_start(); ini_set("display_errors",1); require_once __DIR__.'/dropbox-sdk/Dropbox/strict.php'; $appInfoFile = __DIR__."/AppInfo.json"; // NOTE: You should be using Composer's global autoloader. But just so these examples // work for people who don't have Composer, we'll use the library's "autoload.php

Dropbox Core API JAVA Authorization Code

纵饮孤独 提交于 2019-12-11 14:56:42
问题 Using the dropbox core api tutorial I am able to upload a file. However, my question is an exact replica of this SO post--- That is, once I have my authorization code and comment out the user auth lines so that I dont have to manually re-authorize approval every time I use dropbox I get the following errors: Exception in thread "main" com.dropbox.core.DbxException$BadRequest: {"error_description": "code has already been used", "error": "invalid_grant"} OR Exception in thread "main" com

How to update an attribute or a key for a file while saving it in to documents directory

▼魔方 西西 提交于 2019-12-11 14:35:01
问题 Hi I'm using Dropbox API for my iOS project, here through dropbox iOS SDK's REST calls I'm getting my data and I'm caching my files in to my DocumentsDirectory, so as to avoid delay of loading file from server every time by service calls. So once a file downloaded from dropbox server I'll be keeping it inside my apps documents directory and for further reference I'm fetching from my documents directory. Here the problem is whenever a file is updated or modified a new revision number i will

Upload files to Dropbox using a Dropbox Core API in Javascript

北慕城南 提交于 2019-12-11 13:57:13
问题 I am working on a simple chrome-extension that needs to upload files to the user's dropbox folder. I am using the simple AJAX requests as mentioned below to upload files, however it works for files with extensions such as .txt, .json, .c, etc i.e. files whose mime type is of type text/plain or similar type but all other file types such as pdfs, image files etc get corrupted and produce blank contents. What am I missing in uploading the files the correct way. function startUpload() { var

Retrieve all image files using Dropbox Core API

混江龙づ霸主 提交于 2019-12-11 12:41:27
问题 I am working on Dropbox Core API with Google App Engine (python). There seems to be some problems with Dropbox-python-sdk on GAE. Therefore, I have choose to use the Core APIs directly. My app is trying to retrieve all image files from a user's dropbox (with file type permission). But I couldn't find a way to get all files without specifying the root/path (all the APIs stated here requires a specific file path) Any idea? 回答1: EDIT Dropbox actually recommends not automatically recursing via