File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -276,8 +276,16 @@ export async function alreadyExists(
276276 // const containerContents = await fetchData(uploadUrl);
277277 try {
278278 const containerContents = await getSolidDataset ( uploadUrl , { fetch } ) ;
279- const allegedFile = getThing ( containerContents , `${ uploadUrl } ${ file . name } ` ) ;
280- return true ;
279+ const containedUrls = getContainedResourceUrlAll ( containerContents ) ;
280+
281+ // See if it exists in the list
282+ if ( containedUrls . includes ( uploadUrl + file . name ) ) {
283+ console . log ( "Found a match!" ) ;
284+ return true ;
285+ } else {
286+ console . log ( "No match found." ) ;
287+ return false ;
288+ }
281289 } catch ( e ) {
282290 // console.log(`${uploadUrl}${file.name} does not yet exist, uploading now.`)
283291 return false ;
You can’t perform that action at this time.
0 commit comments