Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
i get this error
System.UnauthorizedAccessException: Access to the path '/data/data/AndroidMaster.AndroidMaster/files' is denied.
public void FileUploadToDropbox() { string fileSource = Environment.GetFolderPath(Environment.SpecialFolder.Personal); using (var dbx = new DropboxClient(token")) using (var fs = new FileStream(fileSource, FileMode.Create, FileAccess.Read)) { var updated = dbx.Files.UploadAsync(("data.db3"), WriteMode.Overwrite.Instance, body: fs); } }
my working code
void Upload() { using (DropboxClient dbx = new DropboxClient("token")) { string file = "/data.db3"; byte[] byteArray = File.ReadAllBytes(@"/data/data/AndroidMaster.AndroidMaster/files/data.db3"); MemoryStream stream1 = new MemoryStream(byteArray); var updated = dbx.Files.UploadAsync(file, WriteMode.Overwrite.Instance, body: stream1); } }
my working code
void Upload() { using (DropboxClient dbx = new DropboxClient("token")) { string file = "/data.db3"; byte[] byteArray = File.ReadAllBytes(@"/data/data/AndroidMaster.AndroidMaster/files/data.db3"); MemoryStream stream1 = new MemoryStream(byteArray); var updated = dbx.Files.UploadAsync(file, WriteMode.Overwrite.Instance, body: stream1); } }
The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.
Sound good? Let's get started.Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on Twitter or Facebook.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!