cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read all about it here.

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 lock

File lock

Avielos
New member | Level 2

Hi,

 

We Created an Dropbox App that is installed in my clients dropbox.

They are assigned to my app.

this app is creating a csv file inside some directory that is automatically created.

This folder in shared amond other users with edit permisions.

My App needs to write to this csv file, but I get the following error on my server:

 

ApiError('f9ee5a51cff24e56b5bcfe2db75e39fb', UploadError('path', UploadWriteFailed(reason=WriteError('conflict', WriteConflictError('file', None)), 

 

Do you know what is the conflict? why it happens?

The csv file is not locked (I don't see the lock icon) but still I see that the options for 'delete' & rename are greyed out. 

 

Thanks,

Aviel

4 Replies 4

Здравко
Legendary | Level 20

Hi @Avielos,

The error, you received, is clear enough (oh.. can be more clear of course, but...). Different scenarios may lead to such result. The most typical one is when upload mode is update, but file revision doesn't match. If so, trace where you have lost the actual revision. Other way, leading to the same result, may be usage meaningless of strictness. If set, even missing file is conflict when existing file is expected (normally the new file is wrote when there is no other). Check your code for a scenario like described or something similar.

Hope this gives direction.

Avielos1
New member | Level 2

Hi,

 

what do you mean exactly 'usage meaningless of strictness'? where do I configure the strictness?

BTW, our upload mode is overwrite.

 

Thanks,

Aviel.

Здравко
Legendary | Level 20

@Avielos1 wrote:

...

what do you mean exactly 'usage meaningless of strictness'? where do I configure the strictness?

...


There is a strictConflict parameter in upload, for instance. Similar for the other upload methods. Default parameter values are fine usually; if needed to change some parameter, just take care.

Hope this helps.

Greg-DB
Dropbox Staff

@Avielos When uploading a file, a 'path/conflict/file' error like this indicates that the upload failed because there was already a file at the specified path. That can occur whether or not the file is "locked". You can find more information about this particular error, as well as the others, in the documentation. You can find that here for the /2/files/upload endpoint itself, which is what the SDKs use as well. (It looks like you're using the Python SDK, so you can also find the Python SDK documentation here.)

 

As Здравко mentioned, you can control the conflict behaviors using the parameters, such as mode, autorename, and strict_conflict. Refer to the documentation linked above for information on those.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Здравко Legendary | Level 20
  • User avatar
    Avielos1 New member | Level 2
What do Dropbox user levels mean?