Skip to content

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

@StenGruener

Description

@StenGruener

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions