File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -302,10 +302,6 @@ async function confirmImage() {
302302 }
303303 const byteArray = new Uint8Array (byteNumbers );
304304 imgBlob = new Blob ([byteArray ], { type: mimeType });
305- } else {
306- imgBlob = await fetch (
307- ` ${import .meta .env .VITE_ADMINFORTH_PUBLIC_PATH || ' ' }/adminapi/v1/plugin/${props .meta .pluginInstanceId }/cors-proxy?url=${encodeURIComponent (img )} `
308- ).then (res => { return res .blob () });
309305 }
310306
311307 emit (' uploadImage' , imgBlob );
Original file line number Diff line number Diff line change @@ -494,19 +494,6 @@ export default class UploadPlugin extends AdminForthPlugin {
494494 return { ok : true , job } ;
495495 }
496496 } ) ;
497-
498- server . endpoint ( {
499- method : 'GET' ,
500- path : `/plugin/${ this . pluginInstanceId } /cors-proxy` ,
501- handler : async ( { query, response } ) => {
502- const { url } = query ;
503- const resp = await fetch ( url ) ;
504- response . setHeader ( 'Content-Type' , resp . headers . get ( 'Content-Type' ) ) ;
505- //@ts -ignore
506- Readable . fromWeb ( resp . body ) . pipe ( response . blobStream ( ) ) ;
507- return null
508- }
509- } ) ;
510497
511498 server . endpoint ( {
512499 method : 'POST' ,
You can’t perform that action at this time.
0 commit comments