The dl=1 parameter is meant for downloading a file in a browser, so if you want to programmatically retrieve the file data, you may want to use raw=1 instead of dl=1. I just tried it and raw=1 returned a 'content-type: image/png' (after the redirect), for example.
You can find the official documentation for this here: https://help.dropbox.com/share/force-download
In short, the recommendation is not to change the hostname, but to parse the URL (as opposed to doing string replacements) to change the URL parameters as needed, and make sure your client can follow redirects automatically.
I have refer the doc, but in my case i want to extract the Content-type of a image from a link and i have tried in postman whenever i am changing hostname it is giving me that content-type properly, but keeping the hostname same and changing the query parameter to dl=1 it is giving application/binarySo what to do for getting correct content-type
const getMedia = (options) => new Promise((resolve, reject) => { request.get(options, (err, response) => { if (err) { reject(err) } resolve(response) }) })
I am doing this to get the Media and then extracting its mime type, sometimes its working and sometimes not, but by changing hostname its working fine, so i want the concrete reason or a any other solution which will be feasible for future also