Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
wayne606
8 years agoNew member | Level 2
can't upload files with curl
I am trying to upload files with curl. Based on community advice I think this should be correct: curl -X POST https://content.dropboxapi.com/2/files/upload \ --header "Authorization: Bearer...
- 8 years ago
Yes, /2/files/upload only supports files up to 150 MB. For larger files, use upload sessions.
shalutyagi
7 years agoNew member | Level 2
can't upload files through swiftydropbox
CURL -
curl -v \
-X POST \
-H "Dropbox-Api-Arg: {\"path\": \"/home/Hike/ios_analytics/New.txt\"}" \
-H "Content-Type: application/octet-stream" \
-H "User-Agent: OfficialDropboxSwiftSDKv2/5.0.0" \
-H "Authorization: Bearer <REDACTED>" \
"https://api-content.dropbox.com/2/files/upload"
Swift code:-
static func uploadFileFromDropbox() {
let fileData = "testing data example".data(using: String.Encoding.utf8, allowLossyConversion: false)!
let client = DropboxClient(accessToken: "<REDACTED>")
client.files.upload(path: "/home/Hike/ios_analytics/New.txt", input: fileData)
.response { response, error in
if let response = response {
print(response)
} else if let error = error {
print(error)
}
}
.progress { progressData in
print(progressData)
}
}
Greg-DB
Dropbox Community Moderator
7 years agoshalutyagi We'll be happy to help with any questions or issues you have with the Dropbox API, but please open a new thread so we can help without spamming anyone else on this old thread.
In your new thread, please share whatever unexpected error/output you get so we can see what's going wrong.
Also, I redacted it from your post, but for the sake of security, you should disable that access token since you shared it publicly. You can disable just this access token using the API:
https://www.dropbox.com/developers/documentation/http/documentation#auth-token-revoke
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!