cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

File Links

Highlighted

File Links

Explorer | Level 3

Hi. I have made my own app using dropbox api. I am having different json files in my dropbox, my app does the following functionality

 

1) download specific file

2) edit that file

3) after editing, upload that fille to dropbox on same path using below method

String remoteFileName = localFile.getName();

try (InputStream inputStream = new FileInputStream(localFile)) {
return mDbxClient.files().uploadBuilder(remoteFolderPath + "/" + remoteFileName)
.withMode(WriteMode.OVERWRITE)
.uploadAndFinish(inputStream);
} catch (DbxException | IOException e) {
mException = e;
}

 As i do not want to change my file link so i am using

.withMode(WriteMode.OVERWRITE)

 as i am fetching my json files from my other apps which contains these file links so i do not want to change my file links. Everything is going well and the links are not changing and updating files successfully. I just want to ask is that a good approach and will it work be in future too? Means editing files without changing links

1 Accepted Solution

Accepted Solutions
Highlighted

Re: File Links

Dropboxer

Yes, this is fine. Dropbox shared links don't break when editing the linked files, and I'm not aware of any plans to introduce a change like that.

 

One note though, in general WriteMode.update is more recommended than the overwrite mode, as it's safer. Using overwrite can lead to your app overwriting new changes that it wasn't aware of.

View solution in original post

1 Reply 1
Highlighted

Re: File Links

Dropboxer

Yes, this is fine. Dropbox shared links don't break when editing the linked files, and I'm not aware of any plans to introduce a change like that.

 

One note though, in general WriteMode.update is more recommended than the overwrite mode, as it's safer. Using overwrite can lead to your app overwriting new changes that it wasn't aware of.

View solution in original post

Work Smarter with Dropbox

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.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?