Prompt user to save on download from Dropbox - dropbox

I want to have a link to download a file from Dropbox that prompts the user instead of displaying the file in the browser. This probably requires setting a content-disposition header to 'attachment'.
I'm currently using the dropbox media URL as described here:
https://www.dropbox.com/developers/reference/api#media
It seems my alternative might be to create a proxy, but I'd obviously like to avoid that.
Is there a way to get this behavior from a direct Dropbox link?

Found the answer myself.
As documented here:
https://www.dropbox.com/help/201
just add dl=1 to the URL.

Related

How to access BigCommerce internalapi?

I am trying to download (backup) images that customers upload for products that take custom logos (these are typically JPG, PNG, PDF, etc.) These customer files are downloadable by clicking on a hyperlink in the BigCommerce admin page for the order in question. The link is not a link to the image path but instead, a link to a service that sends the file to the browser. In other words, you have to be authenticated into the admin site to download the file. The URL looks like this:
https://mystore.com/internalapi/v1/orders/383945/products/251438/attributes/561518/download
https://mystore.com/internalapi/v1/orders/{order id}/products/{lineItem id}/attributes/{option id}/download
These are easily constructed in the API itself for a given order. If I use the link in a browser tab while I'm logged into the admin site, the file downloads.
But what I am trying to write an app to automatically download all the files (there are thousands). When I try to use this URL in an app, I get a authentication error. I tried at first using my regular API credentials but then used the credentials to log into the admin site. Both give me an authentication error.
I could not find anything documented on this so-called "internalapi." Anyone ever try to use this "internal" API that is used by the admin site?
I believe authentication is cookie based for that internal API, but there could be problems with using our non-publicly documented internal APIs in production, i.e. we may make future updates that would be breaking changes.
Images attached to orders through a file upload option also get copied to WebDAV, in the dav/product_images/configured_products folder. Another way to do this could be to use a WebDAV client library like easywebdav to connect and download the files.

Download file directly from dropbox (no sign in)

Is there a way to download file directly from dropbox without logging in. I find this to be a serious limitation. I want to link a few files from website. Can this be done in dropbox?
I realise this can be done with an api (at least in theory) but I have no idea what the link should look like. Cheers.
If you have a Dropbox shared link for a file that can be accessed publicly, you can download from it programmatically.
You can download directly using the link as documented here:
https://www.dropbox.com/help/desktop-web/force-download
Or, you can use the API via the /2/sharing/get_shared_link_file endpoint:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_shared_link_file

Access shared file in Dropbox API

I need to regularly download a file that someone shared with me on Dropbox.
I manage to list all my shared links through the HTTP API (https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_shared_links) but this don't list the file I want.
I can't figure out what is the correct way to download through the API a file that someone shared with me. Here below you can see the print screen on Dropbox where this files is, if it can help...
Based on your screenshot, it sounds like you need to use the /2/sharing/list_received_files and /2/sharing/list_received_files/continue endpoints instead.

OneDrive API Link Sharing Options

I'm currently working on an application that interacts with OneDrive. I've read RESTful API manual and the only option available is to share document.
My questions are:
Is there any way to remove or regenerate file sharing link?
Is there any way to specify user emails to give an access to them?
Is there any way to control this UI option "Recipients need to sign in with Microsoft Account"?
The sharing links that are created do not expire. If you create a sharing link for a file that already shared, a HTTP 200 code will be returned. At this time, createLink is only available but the user can remove the sharing permission from the OneDrive website. Specific user access isn't currently supported. Like the OneDrive website, any created link will not require sign-in. I hope that helps.
The only way to regenerate link to a file is to:
Copy file "foo.docx" to "(Copy) foo.docx"
Remove file "foo.docx"
Rename "(Copy) foo.docx" to "foo.docx"
Generate link for "foo.docx"
There is no way to specify emails for document access
There is no way to control this UI option "Recipients need to sign in with Microsoft Account"

Dropbox Dropin Saver - Can I upload files from a computer?

I am using Dropbox's Dropin Saver to upload files into my Dropbox account. Can I upload a file from my computer (not from a web site)?
No. Presumably the user could just do that on dropbox.com if they wanted?
As finding the straight-forward solution to your question is still not easy, let me point you to the Dropbox API Explorer:
Create a Dropbox Web-App with a few clicks.
Use its Access Token in the Dropbox API Explorer/upload to create a code snippet including a preview for what you are looking for.
Use the cURL or Python code in your code.