File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
src/BootstrapBlazor/wwwroot/modules Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 11import Data from "./data.js"
22import EventHandler from "./event-handler.js"
3- import { readFileAsync } from "./utility.js"
43
54export function init ( id ) {
65 const el = document . getElementById ( id )
@@ -91,17 +90,14 @@ export function preview(previewerId, index) {
9190 }
9291}
9392
94- export async function getPreviewUrl ( id , fileName ) {
93+ export function getPreviewUrl ( id , fileName ) {
9594 let url = '' ;
9695 const upload = Data . get ( id ) ;
9796 const { files } = upload ;
9897 if ( files ) {
9998 const file = [ ...files ] . find ( v => v . name === fileName ) ;
10099 if ( file ) {
101- const data = await readFileAsync ( file ) ;
102- if ( data ) {
103- url = URL . createObjectURL ( data ) ;
104- }
100+ url = URL . createObjectURL ( file ) ;
105101 }
106102 }
107103 return url ;
You can’t perform that action at this time.
0 commit comments