-
Notifications
You must be signed in to change notification settings - Fork 60
Description
Describe the bug
A SME of subtype "File" can specify the path to a file as link to an external file on the internet in the value
field. These files can be downloaded - just like files with local paths - using the /submodels/{sm-id}/submodel-elements/{id-short-path}/attachment
endpoint.
The implementation tries to find the file locally - even if the path in the value
field starts with https://
.
In the org.eclipse.digitaltwin.basyx.core.filerepository.MongoDBFileRepository
class (particulary in the find()
method, there is no means of checking whether the file could be located externally.
Thus, the download failed with the message
404ErrorFileDoesNotExistException-404Requested File inside the Asset administration shell or File SubmodelElement with ID : File at path 'https://<my-web-path>' could not be found. does not exist2025-09-03T13:45:01.654953586Z
To Reproduce
Steps to reproduce the behavior:
- Start the AAS-Environment application
- Upload an AAS with a SM containing at least one "File"-type SME
- Make sure the
value
in the "File"-type SME points to some remote file - Try downloading the file using the
GetFileByPath
endpoint
Expected behavior
The file is provided - either from the backend of the application or because the application itself sets out to download/cache the remote file before delivering it.
BaSyx (please complete the following information):
- BaSyx Version: docker.io/eclipsebasyx/aas-environment:2.0.0-SNAPSHOT
- BaSyx SDK; Java
- AAS Version: DotAAS V3
BaSyx configuration
System (please complete the following information):
- OS: Linux
- CPU architecture: x86
- Browser: Chrome
Metadata
Metadata
Assignees
Labels
Type
Projects
Status