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

[Bug]: Adding Thumbnail to AssetInformation via REST Request doesn't work if Shell was created via REST API #241

Open
BohnSeb opened this issue Apr 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@BohnSeb
Copy link

BohnSeb commented Apr 18, 2024

Contact Details

No response

Describe the bug

If a Shell is created via REST Request, a thumbnail can't be added to the AssetInformation.
{ "messages": [ { "code": "InternalServerError", "correlationId": null, "messageType": "Error", "text": "AASX Package New Package not opened. Aborting!", "timestamp": "18.04.2024 13:21:06" } ] }

To reproduce

  1. Create Shell via REST Request (POST /shells):
    { "idShort": "123456", "id": "this-is-a-test-id", "assetInformation": { "assetKind": "Instance", "globalAssetId": "https://test-url.com/123456", "defaultThumbnail": { "path":"/aasx/thumbnails/this-is-a-test-id.png", "contentType":"image/png" } }, "modelType": "AssetAdministrationShell" }
  2. PUT Image to thumbnail (PUT /shells/dGhpcy1pcy1hLXRlc3QtaWQ=/asset-information/thumbnail):
    multipart/form-data: file=image.png (image.png can be the png that you want to use as the thumbnail)

Screenshots

No response

Expected Behaviour

The Thumbnail is added to the AssetAdministrationShell and displayed in webUI

Version

2023-11-17A

Operating System

Windows

Relevant log output

No Log output in Console
@BohnSeb BohnSeb added the bug Something isn't working label Apr 18, 2024
@BohnSeb
Copy link
Author

BohnSeb commented May 2, 2024

I managed to acquire additional knowledge. Adding an Image is only possible if an aasx file for this shell is present in the data-path folder. This can be "hacked" by manually downloading the package via the GET packages/{packageId} Endpoint.

However the problem seems to be bigger. Even if you add the thumbnail successfully it doesn't get written into the aasx file in the data-path folder. This results in all images (and persumably resources in general) to be lost after a reboot of the server. Should I open a dedicated ticket for this or do you want to handle it in this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant