@@ -49,6 +49,7 @@ async function fetchImageObjectUrl(
4949 const blob = new Blob ( [ rawData as string ] , {
5050 type : encodingFormat ,
5151 } ) ;
52+
5253 return URL . createObjectURL ( blob ) ;
5354}
5455
@@ -284,10 +285,11 @@ const AnalysisPluginContainer = ({
284285 const imageId = asset . filePath . substring (
285286 asset . filePath . lastIndexOf ( '/' ) + 1
286287 ) ;
287- const imgResource = ( await nexus . Resource . get (
288+
289+ const fileResource = ( await nexus . File . get (
288290 orgLabel ,
289291 projectLabel ,
290- encodeURIComponent ( asset . filePath )
292+ encodeURIComponent ( imageId )
291293 ) ) as Resource ;
292294
293295 const src = await fetchImageObjectUrl (
@@ -297,14 +299,15 @@ const AnalysisPluginContainer = ({
297299 imageId ,
298300 asset . encodingFormat
299301 ) ;
302+
300303 return {
301304 src,
302305 id : asset . id ,
303306 contentUrl : asset . filePath ,
304- deprecated : imgResource [ '_deprecated' ] ,
305- filename : imgResource [ '_filename' ] ,
306- lastUpdated : imgResource [ '_updatedAt' ] ,
307- lastUpdatedBy : imgResource [ '_updatedBy' ] ,
307+ deprecated : fileResource [ '_deprecated' ] ,
308+ filename : fileResource [ '_filename' ] ,
309+ lastUpdated : fileResource [ '_updatedAt' ] ,
310+ lastUpdatedBy : fileResource [ '_updatedBy' ] ,
308311 } ;
309312 } ) ;
310313 return [ ...prev , ...assets ] ;
@@ -627,7 +630,7 @@ const AnalysisPluginContainer = ({
627630 algorithm : file . _digest . _algorithm ,
628631 value : file . _digest . _value ,
629632 } ,
630- filePath : file [ '@id ' ] ,
633+ filePath : file [ '_self ' ] ,
631634 preview : ( ) => {
632635 return (
633636 < >
0 commit comments