File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
adminforth/types/adapters Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,18 @@ export interface StorageAdapter {
7070 * @returns A promise that resolves to a string containing the data URL
7171 */
7272 getKeyAsDataURL ( key : string ) : Promise < string > ;
73+
74+ /**
75+ * Determines whether the given URL points to a resource managed by this storage adapter.
76+ * * This method is important for plugins (such as MarkdownPlugin) to distinguish between
77+ * "own" resources (stored in your S3 bucket or local storage) and external links * (such as images from Unsplash or Google).
78+ * * The implementation logic typically includes:
79+ * 1. Checking whether the hostname of the URL matches the configured bucket domain or custom CDN.
80+ * 2. Checking whether the URL path contains the adapter's specific download prefix.
81+ * * @param url - The full URL string to check (can be a public URL or a pre-signed URL).
82+ * @returns A promise that returns true if the URL belongs to this adapter, false otherwise.
83+ */
84+ isInternalUrl ( url : string ) : Promise < boolean > ;
7385}
7486
7587
You can’t perform that action at this time.
0 commit comments