We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

Gregg W.1's avatar
Gregg W.1
Helpful | Level 5
3 years ago

How to programmatically make files available offline.

I have a Macintosh app that does not use the Dropbox api - however, my users do save the app’s data files & packages in a Dropbox folder.

 

The problem is that recently users have been having file packages saved as “Available online-only” which causes huge and unexpected problems and the solution is to switch the file to “available offline.”

 

My question is: Rather than walking my users through the Finder to switch the file package to “available offline” is there something I can do in my app (perhaps via NSFileManager) to change the file to “available offline.”

 

Thanks for your thoughts on this.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    No, unfortunately Dropbox doesn't offer an interface for programmatically managing this setting, such as to set a file to "offline", but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

    • Gregg W.1's avatar
      Gregg W.1
      Helpful | Level 5

      Thanks for the prompt reply, even though it's not what I was hoping for.

       

      I thought a customer of mine had reported double-clicking on a 'Zero byte' png file and the file downloaded from the Dropbox cloud and opened in Apple's Preview app.

       

      If that's true, what is Apple's Preview app doing to trigger the download that I am not doing?

       

      If it's not true, then I apologize for the diversion. I'm still getting a handle on how to deal with the 'Zero byte' files.

       

      Gregg

      • Rich's avatar
        Rich
        Icon for Super User II rankSuper User II

        Gregg W.1 wrote:

        I thought a customer of mine had reported double-clicking on a 'Zero byte' png file and the file downloaded from the Dropbox cloud and opened in Apple's Preview app.


        That's how the feature used to work. If you tried to open an online-only file, the file would be downloaded to the computer and marked as Local. It would remain local until it was manually marked as Online-only again.

         

        Ever since the change, the feature (formally called Smart Sync) now has three states; Available Offline, Available and Online-only. From what I've seen on the forums, Macs have had issues with files switching to Local or Available on the fly, and many have had to manually mark a file as Available Offline before they open it. Search the forums for those topics as other Dropboxers have commented and possibly provided solutions or work-arounds. I'm not a Mac user so I can't comment beyond that.