Skip to content

Commit

Permalink
feat(#253): update download links for sdd files
Browse files Browse the repository at this point in the history
  • Loading branch information
aswallace committed Aug 24, 2023
1 parent 80dcc56 commit 53250e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/src/modules/whyis-dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ function buildDistrLd (fileList) {
.map(x => {
// TODO: check if we want to keep distribution uri as /explorer/dataset/id/filename and redirect for download
distrLDs[x] = {
'@id': `${window.location.origin}/api/files/${fileList[x].filename}?isFileStore=true`,
'@id': `${window.location.origin}${fileList[x].filename}`,
'@type': 'http://purl.org/net/provenance/ns#File',
'http://www.w3.org/2000/01/rdf-schema#label': fileList[x].originalname
'http://www.w3.org/2000/01/rdf-schema#label': fileList[x].swaggerFilename
}
})
return distrLDs
Expand All @@ -238,8 +238,8 @@ function buildDepictionLd (file, uri) {
const depictionLd = {
'@id': `${uri}/depiction`,
'@type': 'http://purl.org/net/provenance/ns#File',
'http://www.w3.org/2000/01/rdf-schema#label': file.originalname,
'http://w3.org/ns/dcat#accessURL': `${window.location.origin}/api/files/${file.filename}?isFileStore=true`
'http://www.w3.org/2000/01/rdf-schema#label': file.swaggerFilename,
'http://w3.org/ns/dcat#accessURL': `${window.location.origin}${file.filename}`
}
return depictionLd
}
Expand Down
2 changes: 1 addition & 1 deletion resfulservice/src/utils/fileManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ async function readFile (req, filename) {
return data;
}

module.exports = { deleteFile, findFile, writeFile, deleteFolder, readFile };
module.exports = { deleteFile, findFile, writeFile, deleteFolder, readFile, getFileExtension };

0 comments on commit 53250e3

Please sign in to comment.