You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

hrh747's avatar
hrh747
Helpful | Level 5
4 years ago

I cannot edit file

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.

  

  • 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.
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    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's avatar
      hrh747
      Helpful | Level 5

      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's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        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.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,915 PostsLatest Activity: 6 years ago
333 Following

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 or Facebook.

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!