dropbox

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

こ雲淡風輕ζ 提交于 2019-12-05 07:03:15
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 directory. I got a public node.js server that currently does nothing. What I would like to do is: As soon

Locally calculate dropbox hash of files

瘦欲@ 提交于 2019-12-05 05:57:31
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. 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_dropbox_hash(filename): file_size = os.stat(filename).st_size num_chunks = int(math.ceil(file_size/DROPBOX

using dropbox as a server for my django app

[亡魂溺海] 提交于 2019-12-05 05:53:02
I dont know if at all i make any sense, but this popped up in my mind. Can we use the 2gb free hosting of dropbox to put our django app over there and do some hacks to run our app? The point you need to understand is: can you run django without djagno installed? Can django be installed on a usb-drive? Dropbox is but a cloud storage service NOT cloud hosting service. To store you do not require RAM and processors while for hosting you do. Hence the answer is NO. If you are okay with configuring apache etc. you can go for VPS. If not try some managed servers. If you dont want to spend much and

Dropbox API v2 JavaScript read file

孤者浪人 提交于 2019-12-05 04:33:49
问题 I would like to use Dropbox's JavaScript API (v2) to read the content of a text file from Dropbox, from what I know the closest method is filesDownload() . suppose we have a test.txt file in the root folder with the content 'abc'. my JavaScript code would look like the following (I use webpack) var Dropbox = require('dropbox'); var dbx = new Dropbox({accessToken: '...'}); dbx.filesDownload({path: '/test.txt'}) .then(function (response) { console.log(response); }) .catch(function (error) {

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

天大地大妈咪最大 提交于 2019-12-05 03:44:21
问题 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

Evaluation of a strategy to sync Core Data with Dropbox

主宰稳场 提交于 2019-12-05 02:06:28
问题 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

Dropbox file unique identifier - RESTful API

狂风中的少年 提交于 2019-12-04 23:55:01
Is there any unique identifier associated with a Dropbox file that doesn't change with revisions/changes/renaming, that can be accessed via the RESTful API? I want to store it in the database and keep track of some operations on the file. Unfortunately, no, the Dropbox API does not currently expose any sort of file ID or hash like this. Edit: The Dropbox API v2 does now offer file IDs that persist across moves/renames. You can find more information under "Path formats" in the documentation . The file ID is available as the id field on the FileMetadata object, e.g., as returned by /files/get

Use of dropbox with core APIs, but avoiding login page

允我心安 提交于 2019-12-04 21:40:10
I want to use Dropbox for my file share application, using Core Dropbox APIs. I am using OAuth 2.0 APIs for authentication (Implicit Grant Method). The issue is, In order to obtain the access token, I need to be logged-in to dropbox account or it redirects me to Dropbox login page. I don't want my users to enter the login crediantials. Is there any way to avoid login process, and directly get access token?? Or Alternatively can I do login using some login api in backend, without user iteraction?? here I am considering a single Dropbox account, whose all necessary crediantials are with me.

Integrate Dropbox in ios app, but without login pop

痴心易碎 提交于 2019-12-04 21:09:26
I want to integrate Dropbox in my app. I have made one sample example using Dropbox document and sample code. But the issue is, I don't want to open login popup. So is there any way so that I can use dropbox without login or some where I can set default login ID Password and automatically do login. so that I can use dropbox directly. Thanks, Hardik Shah Well you could put the files in Dropbox and then share them and use the shared URLs as resources to call. We actually do this for some of our developer blog assets . Hope that helps. Careful not to move the files otherwise the links will break.

iOS Dropbox SDK on Device fails login with NSURLErrorDomain

你说的曾经没有我的故事 提交于 2019-12-04 20:29:10
UPDATE: Setting the Dropbox SDK to use HTTP instead of HTTPS cures this problem on an iPhone 3G. I haven't used the SDK on iPhone 4 or iPad yet so I'm not sure of the result. Playing with the Dropbox SDK on iOS yields these results: in simulator, I can properly link my account using the provided login form class. Changing the build setting to device, I get an error alertView triggered by this method in DBLoginController.m - (void)restClient:(DBRestClient*)client loginFailedWithError:(NSError*)error { [self setWorking:NO]; NSString* message; if ([error.domain isEqual:NSURLErrorDomain]) {