We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
FYVE
8 years agoExplorer | Level 3
Obj-C Trying to upload but am having some issues
Hello, I'm trying to upload files from my app but entering in my fileURLWithPath code doesn't seem to work. It keeps saying the file doesn't exist. I read the exact path in the console and pasted...
FYVE
8 years agoExplorer | Level 3
Thanks!
I figured out the first issue. It was App Sandbox changing a random string of numbers in the local path every time the app launched. Whoops.
Second issue was solved with an update thank you.
Now stuck on upload/overwrite. Where it wants the file data here:
NSData *fileData = [@"file data example" dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO];
I'm giving it the local path to the file like the batch upload method but it just makes a file with text of the path I gave it. That can't be right! Ahah
Also, thanks! I'll have to look into how to do that for multiple downloads.
Greg-DB
Dropbox Community Moderator
8 years agoAre you using uploadData for that? If you want to supply the URL to the local file instead of the Data directly, use one of the uploadUrl methods instead:
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!