Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with file upload - filename missing and file.value changed #385

Open
StenGruener opened this issue Sep 22, 2023 · 0 comments
Open

Comments

@StenGruener
Copy link

StenGruener commented Sep 22, 2023

Hi all,

my scenario is to load an AASX package with a File element "File1" which references a file which is included in the AASX package "abc.txt":

after the load of the AASX file into the server, a file element is created

  "modelType": {
    "name": "File"
  },
  "dataSpecification": [],
  "embeddedDataSpecifications": [],
  "kind": "Instance",
  "value": "http://host/aasServer/basyx-temp/aasx1/files/aasx/files/abc.txt",
  "mimeType": "text/plain",
  "idShort": "File1",
<---cut off--->
}

When I navigate the value link, the filename of the download abc.txt (probably taken from AASX file)

After upload the file by using /File1/upload URK, the content is changed to:

  "modelType": {
    "name": "File"
  },
  "dataSpecification": [],
  "embeddedDataSpecifications": [],
  "kind": "Instance",
  "value": "http://host/aasServer/shells/<aas_id>/aas/submodels/<submodel_name>/submodel/submodelElements/File1/File",
  "mimeType": "text/plain",
  "idShort": "File1",
<---cut off--->
}

When I navigate the value link, the filename of the download is changed to File1.txt (probably combination of idShort and mimeType)

There are many flaws:

  • the content of "File1.value" may change anytime and cannot be cached
  • the actual filename of the download may change anytime (or get lost compared to AASX files) and we need business-logic to workaround it

I understand that this is not at all specified in AAS specs, ideally you would just replace the static file "basyx-temp/aasx1/files/aasx/files/abc.txt" on file upload in case the file was coming out of the AASX file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant