dropbox-api

Problem in downloading Folder with dropbox api

我是研究僧i 提交于 2019-12-07 12:59:02
问题 I am using Dropbox api and tried to download folder but it is not working. I am able to download any type of file but not entire folder ..Here is my code which I used to download file NSLog(@"called"); NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *file = [NSString stringWithFormat:@"/%@",[metaArray objectAtIndex:indexPath.row]]; //NSString *file = @"/Photos"; NSString *path = [NSString stringWithFormat:@"%@/Downloaded Data/%@",

Using dropboxjs to authenticate the client with oauth 2. What about the server?

◇◆丶佛笑我妖孽 提交于 2019-12-07 03:08:00
问题 I'm new to Oauth and server-side stuff, so please be patient with me. I have a web application that authenticates users with dropbox-js. Everything is pretty straightforward. The application uses dropbox-js' client.authenticate function, and if the user is authenticated, the application gets automatically redirected to the initial page, where it executes the authenticate callback. From that moment on, I know I'm happily authenticated with Dropbox, and I can do stuff with the app's Dropbox

Locally calculate dropbox hash of files

∥☆過路亽.° 提交于 2019-12-07 01:54:15
问题 Dropbox rest api, in function metatada has a parameter named "hash" https://www.dropbox.com/developers/reference/api#metadata Can I calculate this hash locally without call any remote api rest function? I need know this value to reduce upload bandwidth. 回答1: https://www.dropbox.com/developers/reference/content-hash explains how Dropbox computes their file hashes. A Python implementation of this is below: import hashlib import math import os DROPBOX_HASH_CHUNK_SIZE = 4*1024*1024 def compute

What is a Dropbox API (v2) Union Tag?

烂漫一生 提交于 2019-12-06 16:55:11
While starting to develop a Dropbox app using the Python SDK, I'm tripping conceptually over what the AccessLevel documentation calls a union tag . (The concept extends beyond the AccessLevel class, but this seems like as good an example as any.) I'm trying to understand why the _tag attribute basically appears to be intended for internal use only. Why, if I want to know if a user has editor, owner, or viewer permission—-and it can only be one of those--I seem to be supposed to call the is_owner() , is_editor() , and is_viewer() methods until I get a True response. What am I missing? Why

File migration via dropbox APi

耗尽温柔 提交于 2019-12-06 15:26:23
I'm using the dropbox API to migrate a large amount of files from one dropbox account to another. This seems to be taking between 2 and 7 seconds per file. Are there any ways to speed up the time it takes to move files using the dropbox API? source = dropbox.Dropbox('connectionstring') target = dropbox.Dropbox('connectionstring') list_folder = source.files_list_folder('') while list_folder: files = re.findall(r'name=[\'"]?([^\'" >]+)', str(list_folder)) for f in files: source.files_download_to_file(f,'') files = open(f,mode='rb') target.files_upload(files.read(),'') files.close() os.remove(f)

Dropbox Javascript Datastores API example in Phonegap provides error forbidframing for Windows8 app

微笑、不失礼 提交于 2019-12-06 12:04:05
问题 I have attempted to create a Phonegap app supporting both Android and Windows8 for the Dropbox Javascript Datastores API that makes use of the example provided here: https://github.com/dropbox/cordova-datastores-example When I build and run the Android app, it runs perfectly on the Android tablet. But when I run the app created for Windows8, an error is displayed: The app couldn't navigate to ... because of this error: FORBIDFRAMING . And then nothing happens afterwards. I haven't been able

Android - Downloading File by updating Progress Bar

筅森魡賤 提交于 2019-12-06 11:39:08
I have multiple files in dropbox account. I am successfully downloading files. But I want to show the progress bar with the percentage so when all files gets downloaded.The progress bar finishes.I am using AsyncTask for downloading files.here is my code. public void onPreExecute(){ mDialog = new ProgressDialog(mContext); mDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); mDialog.setMax(100); mDialog.show(); } public void downloadFiles(String filename){ Log.i("Item Name",filename); File dir = null; Boolean isSDPresent = android.os.Environment.getExternalStorageState().equals(android.os

How to upload multiple files at the same time using the dropbox java api

寵の児 提交于 2019-12-06 10:21:14
I would like to know how to upload multiple files to dropbox using the java dropbox api. I would like to know this as currently, when I want to upload a folder, I recursively go through every file in the folder and upload them one by one. However, I find this too slow. So, I thought that I could just upload all the files in a folder at once. But, how would I do this? Should I create n number of threads and each thread uploads a single file or what? Yes, you can call the API using multiple threads and upload files. You can use Thread Pools for the same. You need to identify the point for

Deauthentication through Dropbox JSON API (webhooks)

試著忘記壹切 提交于 2019-12-06 06:48:55
We're using the Dropbox API in our App but haven't found a way to succcessfully deauthenticate. Currently we call the disable_access_token on logout, which works (i.e. subsequent calls using the token fail). Unfortunately, the next time the OAuth2 login process is initiated the session gets completely revived without asking the user for their credentials, meaning that until the app is uninstalled, only one Dropbox user can be authenticated. This seems to be a regression issue as everything was working a few weeks ago (that is, the session was not being revived automatically). EDIT To be clear,

Download files from Dropbox shared folder using Dropbox API

时光总嘲笑我的痴心妄想 提交于 2019-12-06 04:48:03
A friend sent me the URL of a dropbox folder he shared with me. This folder has files whose total size is about 8GB. I have a basic account with 2GB limit, so I cannot add the shared folder contents to my dropbox folder. How do I programmatically download all the files from the shared folder to my PC? I checked the documentation (both v1 and v2) and didn't find any APIs that would do this. Am I missing something? The current version of the Dropbox API, has endpoints for getting the metadata of shared links, as well as downloading files from shared links: to get the metadata for a shared link: