How can I stop Mendeley's automatic synchronization? I do not want to upload some pdf files.
You can prevent Mendeley from syncing all of your pdf or that in particular folders of your library. Just select "All Documents" and then click "Edit Settings"
How to open Mendeley Sync Settings
Then you can opt out "Synchronize attached files" or select what folders do you want to sync.