payload-cloudinary
Version:
A Cloudinary storage plugin for Payload CMS
13 lines • 612 B
TypeScript
import type { CollectionBeforeReadHook } from "payload";
/**
* This hook constructs the proper URL for accessing the file through Payload's API
* It uses the server URL, collection slug, and Cloudinary public ID to create the URL
*
* @param {Object} params - The hook parameters
* @param {Object} params.doc - The document being read
* @param {Object} params.req - The request object
* @param {Object} params.collection - The collection configuration
* @returns {Object} The document with updated URL
*/
export declare const beforeRead: CollectionBeforeReadHook;
//# sourceMappingURL=change-url.d.ts.map