Creating a folder in the Dropbox Desktop folder with Node JS from Electron app


#1

I’m developing an electron app that integrates with the Dropbox javascript SDK and uses node js to perform tasks on the local machine, allowing an online and offline experience.

All I am doing is programmatically creating a new folder in the Dropbox desktop folder using node js… the problem is that it automatically sets to NOT sync. I need it to sync as default. If I manually create a new folder then it DOES automatically set to sync.

On looking at the folders permissions through the Terminal I thought it was to do with the fact that the manually create folder had an extended attribute. So I used xattr module to copy the extended attributes found on the syncing folders but it still will not set to sync:

Slice 1

‘Hello’ was created manually whereas ‘General Information’ was created through node js

I guess my question is how do I use node js to exactly replicate what happens when you manually create a folder?

I’ve been in touch with Dropbox Help who were, well, not much help at all, and have also posted this on the dropbox community forum and stack overflow but I am so tight on time I thought I’d try here as well. Can anyone help?