Skip to content

Commit 2187d12

Browse files
author
Vitalii Kulyk
committed
Merge branch 'next' of github.com:devforth/adminforth into next
2 parents 6b9ef3a + 49e90c7 commit 2187d12

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

adminforth/spa/src/components/ThreeDotsMenu.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
<li v-for="action in customActions" :key="action.id">
4747
<div class="wrapper">
4848
<component
49-
v-if="action.customComponent"
5049
:is="(action.customComponent && getCustomComponent(formatComponent(action.customComponent))) || CallActionWrapper"
5150
:meta="formatComponent(action.customComponent).meta"
5251
@callAction="(payload? : Object) => handleActionClick(action, payload)"

adminforth/types/adapters/StorageAdapter.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)