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
Justin P.2
9 years agoCollaborator | Level 10
Key Command/Shortcut to "Copy Dropbox Link" from Mac Finder.
I copy download links all day from the Mac Finder. It would be great to assign a key command so that you can highlight a file in your Dropbox via Mac Finder, and press a key command to copy the link ...
- 4 years ago
Update (2023-01-17)
I've moved the script to a repository and expanded on the instructions.
I wanted this now, so I wrote a Python script to get the URL from the command line and created an Automator QuickAction that calls the script with the selected file(s) in Finder:
Now, ^⌘L copies the Dropbox URL of any number of files selected in the Dropbox folder.
dhermanq
Helpful | Level 6
This has been working so well for me, thank you Gene_Parmesan!!
FWIW, I wanted to report a small quirk that I've noticed, which is that a link can only be copied once the file has completed syncing. If it hasn't completed yet, I get the following error message:
Interestingly, if I right-click the file and use Dropbox's "Copy Dropbox link" action, it will work even if file hasn't completed its sync. Do you have any thoughts as to whether or not this is something that can be addressed by the script, or is this a limitation of the Dropbox API?
Gene_Parmesan
2 years agoCollaborator | Level 8
Hi dhermanq, glad the script is working well for you! I've had a look at the dropbox Python API docs for the function in question, and I found an option I hadn't noticed before:
pending_upload: If it’s okay to share a path that does not yet exist, set this to either PendingUploadMode.file or PendingUploadMode.folder to indicate whether to assume it’s a file or folder.
And indeed, when I upload a large file without this setting and request a link before the upload is complete, I get the same error as you. However, when I set this to PendingUploadMode.file, the link is generated anyway. When you use the generated link before the file is fully uploaded, you get this placeholder UI:
It's noteable that this option is available when using sharing_create_shared_link, but NOT with the alternative sharing_create_shared_link_with_settings which is used in the script posted by Здравко. So you'd be running into this with either script. Note also that the function description for sharing_create_shared_link says: "If a shared link already exists for the given path, that link is returned." (The function without settings which I'm using, though, is marked as deprecated. If anyone knows how to enable PendingUploadMode with the new-style call, I'd be happy to accept a PR in the repo. I don't immediately see how to do this after looking through the docs and the forum.)
Anyway, now that I've found this alternative, I've pushed a fix linked to issue #10 in the repo. Let me know if that fixes the behavior for you!
- dhermanq2 years agoHelpful | Level 6
Gene_Parmesanthe update did the trick! Thank you!!
- Здравко2 years agoLegendary | Level 20
It's never good idea methods, declared as deprecated, to be in use. 'sharing_create_shared_link' is such a method! The same effect has a preceding dummy upload though. My script is just an example, that's why not feature rich, but if you want to improve yours, better include preceding dummy upload as an option instead of using deprecated things that can be dropped at any time. Such methods are for back compatibility only, that let some time for developers to adapt their codes, and not supposed to be used in new code!
Add: Gene_Parmesan, One more thing you may want to update is new links conception that's rolling out currently. Probably soon all accounts will start generate new links and the query replacement, as you have implemented it, will stop work!
- Gene_Parmesan2 years agoCollaborator | Level 8
I am not doing any uploading, I'm only getting shared links. Oddly, the docs don't list this method as deprecated, it's just a warning that is supposed to be printed when you call it. (But I'm not seeing it for some reason, I only noticed it because I looked at the code!) And it's been "deprecated" for 7 years now.
Anyway, the whole thing is a bit perplexing, so I've opened a new thread about it.
As for the "new links" concept, I'd appreciate a pointer to some documentation on what this means. I don't know what change you're referring to, since I'm far from a Dropbox expert.
- Здравко2 years agoLegendary | Level 20
Gene_Parmesan wrote:I am not doing any uploading, I'm only getting shared links. ...
Yes, and it's the initial idea, of course. The deprecated method (on behalf corresponding access point) makes on dummy upload for you. On the same place you can see the method deprecation, explicitly pointed out. The official documentation is automatically generated and that's why some of the details may miss. How long particular things can stay deprecated... good question, but rarely defined; here undefined yet at least. Probably defined on how many particular access point is still in use and usually least a year.
Gene_Parmesan wrote:...
As for the "new links" concept, I'd appreciate a pointer to some documentation on what this means. I don't know what change you're referring to, since I'm far from a Dropbox expert.
You can see some more info on the thread here. As always documentation lags in time. 🤷
- Gene_Parmesan2 years agoCollaborator | Level 8
I can no longer see the new post I created with more information and asking for insight from (hopefully) Dropbox staff about sharing_create_shared_link_with_settings. The topic doesn't appear in the forum where I posted it, and clicking the title in my profile just sends me here. Do you know why this might be happening Здравко ?
- Здравко2 years agoLegendary | Level 20
Gene_Parmesan wrote:... Do you know why this might be happening Здравко ?
Seems the 2 threads joined by Dropbox staff. They have found them too similar, probably.
About View, download, and export
Need support with viewing, downloading, and exporting files and folders from your Dropbox account? Find help from the Dropbox Community.
Need more support
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!