cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

I cannot edit file

I cannot edit file

hrh747
Helpful | Level 5
Go to solution

Hi,

As part of my familiarization with the Dropbox APIs, I have successfully uploaded a file using the API onto a folder in my Dropbox account. This is the ONLY app folder I have set up in Dropbox (not shared). However, the file is not editable, so I can't change its content manually in Dropbox. I don't seem to find a way to change the permission. Following are the screen-shots of the Settings and the Permissions.

Screenshot 2021-10-20 200502.pngScreenshot 2021-10-19 231336.png

  

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Thanks for following up and clarifying. It sounds like you're referring to trying to edit a text file on www.dropbox.com. The Dropbox web site doesn't offer text editing functionality for .txt files like that, but you have several options of other ways to edit the file, such as:

  • You can edit the file locally on your computer if you have the Dropbox desktop client installed, in which case the change will sync to Dropbox automatically.
  • You can download the file, edit it locally, and then upload the new version.
  • You can use the the files_upload method again to upload a new version of the file data.

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution

Can you elaborate on what you mean when you say "the file is not editable"? Please share the steps and code you're following that lead to the issue, as well as whatever unexpected error or output you're getting. Be sure to redact any access token or refresh token though.

hrh747
Helpful | Level 5
Go to solution

Hi Greg,

 

Here is the code that I used to upload the file to Dropbox:

with open(LOCAL_FILE, 'rb') as f:
# We use WriteMode=overwrite to make sure that the settings in the file
# are changed on upload
print("Uploading " + LOCAL_FILE + " to Dropbox as " + BACK_UP_PATH + "...")
try:
dbx.files_upload(f.read(), BACK_UP_PATH, mode=WriteMode('overwrite'))
except ApiError as err:
...........................

 Once the file is uploaded, I login to my Dropbox account, locate the file in my Dropbox app folder and open it, however, I can't change its content. The first line in the file is 'Scheduled Operation: False' and I would like to change 'False' to 'True' but I can't. I don't get any errors but the file seems to be read-only.

 

Hope this helps

 

Greg-DB
Dropbox Staff
Go to solution

Thanks for following up and clarifying. It sounds like you're referring to trying to edit a text file on www.dropbox.com. The Dropbox web site doesn't offer text editing functionality for .txt files like that, but you have several options of other ways to edit the file, such as:

  • You can edit the file locally on your computer if you have the Dropbox desktop client installed, in which case the change will sync to Dropbox automatically.
  • You can download the file, edit it locally, and then upload the new version.
  • You can use the the files_upload method again to upload a new version of the file data.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    hrh747 Helpful | Level 5
What do Dropbox user levels mean?