We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d8423ec + 9fad6b3 commit ff111f2Copy full SHA for ff111f2
1 file changed
index.ts
@@ -162,6 +162,22 @@ export default class UploadPlugin extends AdminForthPlugin {
162
return { ok: true };
163
};
164
165
+ async isInternalUrl(url: string): Promise<boolean> {
166
+ const adapter = this.options.storageAdapter as any;
167
+
168
+ if (adapter && typeof adapter.isInternalUrl === 'function') {
169
+ try {
170
+ return await adapter.isInternalUrl(url);
171
+ } catch (err) {
172
+ console.error(`[UploadPlugin] Error calling isInternalUrl on adapter:`, err);
173
+ return false;
174
+ }
175
+ } else {
176
+ throw new Error ('Plese update storage adapter')
177
178
179
180
181
instanceUniqueRepresentation(pluginOptions: any) : string {
182
return `${pluginOptions.pathColumnName}`;
183
}
0 commit comments