Yes, It is possible to upload or fetch resources that are password protected with Cloudinary.
How this is accomplished depends on how you're uploading the resources.
Specify the username and password as part of the URL you supply when calling the Upload API using our SDKs. This is supported for HTTP/HTTPS URLs, and FTP URLs.
Ruby on Rails SDK examples:
Provide the username and password as part of the HTTP/HTTPS URL of the resource when using the /fetch/ URL component to specify a remote URL to be fetched.
Note <url> excludes `http://` and `https://`.
Because this includes the remote username and password in the user-visible URL, we do not recommend using URLs like this in publicly-accessible code.
Specify the URL including the username and password, in the auto upload mapping section of the upload settings.
Configure the parameters as follows:
- Folder set to a value of your choice, for example, 'test'.
- Set the URL prefix to the URL prefix of the remote resources including username and password: https://<username>:<password>@<url_prefix>
This will mask the username and password from being in the URL, so the resulting Cloudinary URL will be:
More information on auto upload mapping can be found here: https://cloudinary.com/documentation/fetch_remote_images#auto_upload_remote_resources
Please sign in to leave a comment.