0.4.2 • Published 2 years ago

sanity-plugin-aprimo v0.4.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Aprimo asset selector for Sanity

aprimo gif

This plugin allows you to open the Aprimo DAM asset selector from your studio and save those chosen assets and renditions in your Sanity documents.

NOTE: To take advantage of assets that aren't public renditions, you will need to authenticate requests from the studio. Because CORS isn't possible with Aprimo, you will need to set up a proxy to route authentication requests (this proxy endpoint can be configured from the studio). Your proxy endpoint should be able to route requests from the studio to https://your-tenant-name.aprimo.com/api/oauth/create-native-token. If you are using serverless functions or Next.js and would rather route all requests according to an X-URL header, we've set up a quickstart example for that here.

Installation

  1. In your studio directory, run sanity install aprimo.
  2. Declare a field to be aprimo.asset or an aprimo.cdnasset (for public renditions) in your schema. For example:
    {
      type: "aprimo.asset",
      name: "image",
      description: "This asset is served from Aprimo",
    }
  1. Navigate to that directory in your studio. There will be a plugin icon to the top left of that field, that will allow you to add the credentials for your Aprimo tenant. Enter in these details (they will be safely stored in your Sanity dataset as a private document. Remember to include these credentials across all your datasets!) If any of these fields are confusing, contact your Aprimo administrator.

Usage

After the above, you should be able to use the selector on any field declared as aprimo.asset or aprimo.cdnasset. By including the aprimo.asset type in an array, you can use the multiple selector in Sanity as well.

0.4.1

2 years ago

0.4.2

2 years ago

0.4.0

3 years ago

0.3.9

3 years ago

0.3.8

3 years ago

0.3.7

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago