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

File path change with MongoDB backend #427

Open
L3xooo opened this issue Feb 17, 2024 · 8 comments
Open

File path change with MongoDB backend #427

L3xooo opened this issue Feb 17, 2024 · 8 comments

Comments

@L3xooo
Copy link

L3xooo commented Feb 17, 2024

I am having issue with uploading the aasx package when I am using MongoDB for data persistance.... I have set up the MongoDB, AAS Registry and AAS Server in docker container with configurations files for each (.properties). My issue is that if i added aasx package w submodel with file during runtime I am able to dowload it but the name and file type is not saved... Instead of zip file i am getting some random extension for that file and also changes file name

Is there any solution for this to be able to upload AASX file with submodels with files during the AAS server runtime and file name and type will remain the same?

Best regard,

Peter

@FrankSchnicke
Copy link
Contributor

Thanks a lot for submitting this issue. Can you provide a demo setup replicating your issue?

Is there any reason why you are still using the 1.X Components of BaSyx? With the update of the meta model & REST API by the IDTA to V3, they are becoming obsolete.

The new components conforming to the newest specifications by IDTA can be found here:
https://github.com/eclipse-basyx/basyx-java-server-sdk

@L3xooo
Copy link
Author

L3xooo commented Feb 22, 2024

Hi Frank,
Answer to the second question is that I didn't realize that there is 2.X version of BaSyx components, and until now i didn't have any issue with REST API and so on,...

Back to the first one, I am running AAS Server, AAS Registry and MongoDB in the Docker with compose file,... Then i have React in frontend and Dotnet backend and bassically I want to upload the file by runtime with /aasx endpoint with POST request. The .aasx file have a submodel with .zip file inside.. The issue there as i mention before is that if i dont upload it by runtime but specify it in the aas.properties as aas.source file it work and after accessing the url of the file .zip file is downloaded correctly... But if i upload the .aasx file by runtime and access the link the downloaded file is renamed and also the extension of file in this case .zip is changed to something that dont even exist... I was able to bypass that with script that will do after the download rename of the file and changing the extension to .zip... The content of the file after that is valid and zip file is okay but thats only as the last option cause i have to find and least some working solution in short time..
image

@FrankSchnicke
Copy link
Contributor

Would it be possible to upload the docker compose as well as the aasx file itself here on GitHub?

@L3xooo
Copy link
Author

L3xooo commented Feb 23, 2024

Github dont have support for uploading aasx file format, i think it Will be posisble to only upload docker compose...

@FrankSchnicke
Copy link
Contributor

You can rename the aasx file to end in *.zip. Then, GitHub will accept it.

@L3xooo
Copy link
Author

L3xooo commented Feb 23, 2024

github.zip

@mdanish98
Copy link
Contributor

Hi @L3xooo ,

Thanks for raising this issue.

There are two problems pointed by you and those are as follows (correct me if I have missed something here):

  1. Instead of a zip file I am getting some random extension for that file.
  2. The file name is changed

We analyzed the problem and here is our analysis:

  • For the first issue the problem is in configuration of the File SubmodelElement, the mimetype for this file is set wrongly in the AASX file, instead of application/zip, it is set as application/step. After, changing the mimetype, the zip file is able to download properly.

Note: If you are using the AASX Package Explorer and the drop down list of mimeType doesn't contain application/zip, you can define your own in the same text box, i.e., it is editable.
image

  • For the second issue we are analysing the problem, we will fix this and update here.

Please let us know if you have any further concerns.

@L3xooo
Copy link
Author

L3xooo commented Mar 7, 2024

Thanks for your response, yes i am using AASX Package explorer, will change the the to the application/zip...

Thanks for solving the issue for me.

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

3 participants