File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,22 @@ export default class UploadPlugin extends AdminForthPlugin {
162162 return { ok : true } ;
163163 } ;
164164
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+ return false ;
179+ }
180+
165181 instanceUniqueRepresentation ( pluginOptions : any ) : string {
166182 return `${ pluginOptions . pathColumnName } ` ;
167183 }
You can’t perform that action at this time.
0 commit comments