dropbox-api

Python - Transfer a file from HTTP(S) URL to FTP/Dropbox without disk writing (chunked upload)

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-02 09:53:57
问题 I have a large file (500 Mb-1Gb) stored on a HTTP(S) location (say https://example.com/largefile.zip ). I have read/write access to an FTP server I have normal user permissions (no sudo). Within these constraints I want to read the file from the HTTP URL via requests and send it to the FTP server without writing to disk first. So normally, I would do. response=requests.get('https://example.com/largefile.zip', stream=True) with open("largefile_local.zip", "wb") as handle: for data in response

Python - Transfer a file from HTTP(S) URL to FTP/Dropbox without disk writing (chunked upload)

心已入冬 提交于 2020-01-02 09:53:06
问题 I have a large file (500 Mb-1Gb) stored on a HTTP(S) location (say https://example.com/largefile.zip ). I have read/write access to an FTP server I have normal user permissions (no sudo). Within these constraints I want to read the file from the HTTP URL via requests and send it to the FTP server without writing to disk first. So normally, I would do. response=requests.get('https://example.com/largefile.zip', stream=True) with open("largefile_local.zip", "wb") as handle: for data in response

Using Proguard to Obfuscate Android App with Dropbox.com Libraries

烂漫一生 提交于 2020-01-01 02:40:17
问题 I've just finished creating an Android app that requires the Dropbox.com API libraries. I'm now trying to build the application in 'Release' mode and would like to run proguard on the code in order to obfuscate it. However, whenever I attempt to run Proguard, I get the following error: Proguard returned with error code 1. See console Warning: com.dropbox.client2.DropboxAPI: can't find referenced class org.json.simple.JSONArray Warning: com.dropbox.client2.DropboxAPI: can't find referenced

Prompt user to save on download from Dropbox

人走茶凉 提交于 2019-12-31 04:51:12
问题 I want to have a link to download a file from Dropbox that prompts the user instead of displaying the file in the browser. This probably requires setting a content-disposition header to 'attachment'. I'm currently using the dropbox media URL as described here: https://www.dropbox.com/developers/reference/api#media It seems my alternative might be to create a proxy, but I'd obviously like to avoid that. Is there a way to get this behavior from a direct Dropbox link? 回答1: Found the answer

Dropbox v2 API - large file uploads

眉间皱痕 提交于 2019-12-29 10:02:51
问题 This question follows on from my previous question on the same subject. Simple file uploads are, well, simple . $headers = array("Authorization: Bearer dropbox_token", 'Content-Type: application/octet-stream', 'Dropbox-API-Arg: {"path":"/path/file.ext", "mode":"add"}'); $data = "I love Stackoverflow"; $ch = curl_init('https://content.dropboxapi.com/2/files/upload/'); curl_setopt($ch,CURLOPT_HTTPHEADER,$headers); curl_setopt($ch,CURLOPT_POST,true); curl_setopt($ch,CURLOPT_POSTFIELDS,$data);

Dropbox iOS SDK: WebKit Discarded an Uncaught Exception

烂漫一生 提交于 2019-12-29 09:33:06
问题 I am using the Dropbox iOS SDK (as of this writing, Cocoapod version 1.3.9). I noticed a strange bug. Here are the steps to reproduce it. Connect to Dropbox, successfully sign in, and link to my account. URL logged to the console (tokens masked for security): db-abcdef123://1/connect?oauth_token=xyz123&oauth_token_secret=lmno123&uid=10884&state=91D8CB70-1037-4A4C-8F7B-CB8970E5E0BC App linked successfully! Sign out, then sign in with a different account... URL logged to the console again,

DropBox sync api for iOS not call observer when download images

ぃ、小莉子 提交于 2019-12-25 18:27:27
问题 Hi i am using DBX sync api to sync my app datas and download images from DBX. Before i used core api for download images it works fine. But core and sync apis wont work together. So i switched to sync api for download files also but now download images with progress observer not called. this is my observer code. DBFile *orignalImg = [[DBFilesystem sharedFilesystem]openFile:imgPath error:nil]; NSLog(@" -----> %@, %i , %@", orignalImg,orignalImg.status.state, imgInfo.imgPath); __weak DBFile

DropBox sync api for iOS not call observer when download images

和自甴很熟 提交于 2019-12-25 18:26:52
问题 Hi i am using DBX sync api to sync my app datas and download images from DBX. Before i used core api for download images it works fine. But core and sync apis wont work together. So i switched to sync api for download files also but now download images with progress observer not called. this is my observer code. DBFile *orignalImg = [[DBFilesystem sharedFilesystem]openFile:imgPath error:nil]; NSLog(@" -----> %@, %i , %@", orignalImg,orignalImg.status.state, imgInfo.imgPath); __weak DBFile

Dropbox confirmation dialog pop-up every times when button is clicked

半城伤御伤魂 提交于 2019-12-25 14:04:57
问题 I am implementing dropbox in my app.When I am clicking a button I am connecting to dropbox. The problem Each and every time when I click the button,the dropbox confirmation dialog pops up and I want to avoid that after successful auithentication and one time confirmation. The code public static boolean mLoggedIn = false; private boolean isItemClicked = false; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout

Android Dropbox API v2 auto access using access token

◇◆丶佛笑我妖孽 提交于 2019-12-25 07:49:17
问题 In android API v1 I am able to pass access token through which I didn't need to login to Dropbox. In api v2 can you please let me know how to do that? In API v2 auto access can be done without the following code - Auth.startOAuth2Authentication(MainActivity.this, Constants.APP_KEY); Please provide me any solution. 回答1: Yes, using the Dropbox API v2 Java SDK, you can still directly supply an access token without starting the authorization flow. To do so, you can use a DbxClientV2 constructor