Direct download link?

Hi there!

I’m working with a Make workflow and trying to come up with a workaround to not being able to move an asset. Is there a way to get or determine a direct download URL from an asset that I can then use to create a new asset from (via Make)? Using Make’s “Get and Asset” module gives me lots of info, but not a direct URL to the asset. Any suggestions?

Thanks!
Steve

There may not always be a direct download URL present, but if there is one you’ll find it under the key: original!

Use the “Get an Asset” module provided by Make to retrieve information about the asset. As you mentioned, this module provides you with various details, but not the direct download URL.

If there is no value for the original key then you may not have permission to download that particular asset because of your access level with the account and the account settings the admin has chosen.

Sure, there are a few ways to get a direct download URL from an asset that you can then use to create a new asset via Make.

One way is to use the Get and Asset module to get the asset’s downloadUrl property. This property will contain the direct URL to the asset, which you can then use to create a new asset.

Another way to get a direct download URL is to use the Get Asset Info module. This module will return a JSON object with information about the asset, including the downloadUrl property.

Finally, you can also use the Get Asset Metadata module. This module will return a JSON object with all of the metadata for the asset, including the downloadUrl property.

Once you have the direct download URL, you can use it to create a new asset via Make. The following is an example of how to do this:

`// Get the direct download URL for the asset.
const downloadUrl = asset.getDownloadUrl();

// Create a new asset.
const newAsset = make.createAsset({
name: “New Asset”,
type: “file”,
data: downloadUrl,
});`

This will create a new asset with the name “New Asset” and the type “file”. The data for the new asset will be the direct download URL for the original asset.