Skip to content

Commit 5c64063

Browse files
committed
Add absolute paths to datasets with no mag paths
1 parent 71b3e30 commit 5c64063

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/DataSourceService.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,13 @@ class DataSourceService @Inject()(
392392
mag =>
393393
mag.path match {
394394
case Some(pathStr) => mag.copy(path = Some(replaceUri(new URI(pathStr)).toString))
395-
case _ => mag
395+
// If the mag does not have a path, it is an implicit path, we need to make it explicit.
396+
case _ =>
397+
mag.copy(
398+
path = Some(
399+
new URI(newBasePath)
400+
.resolve(List(layerWithMagLocators.name, mag.mag.toMagLiteral(true)).mkString("/"))
401+
.toString))
396402
},
397403
attachmentMapping = attachment =>
398404
DatasetLayerAttachments(

webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/uploading/UploadService.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,12 @@ class UploadService @Inject()(dataSourceService: DataSourceService,
398398
datasetSizeBytes: Long <- if (uploadToS3) {
399399
for {
400400
_ <- Fox.successful(())
401-
401+
_ = logger.info(
402+
s"Starting upload of dataset ${dataSourceId.organizationId}/${dataSourceId.directoryName} to S3.")
402403
s3ObjectKey = s"${dataStoreConfig.Datastore.S3Upload.objectKeyPrefix}/$uploadId/"
403404
_ <- uploadDirectoryToS3(unpackToDir, dataStoreConfig.Datastore.S3Upload.bucketName, s3ObjectKey)
405+
_ = logger.info(
406+
s"Finished upload of dataset ${dataSourceId.organizationId}/${dataSourceId.directoryName} to S3.")
404407
endPointHost = new URI(dataStoreConfig.Datastore.S3Upload.endpoint).getHost
405408
s3DataSource <- dataSourceService.prependAllPaths(
406409
dataSource,

0 commit comments

Comments
 (0)