Read the following guideline: Troubleshooting and Support | Squidex. I understand that my support request might get deleted if I do not follow the guideline.
Used code blocks with ``` to format my code examples like JSON or logs properly.
I’m submitting a…
Regression (a behavior that stopped working in a new release)
Upload the asset and return the content-type as desired.
When uploading assets, I’d like to receive a content-type response for a specific file.
I need to determine the content-type to respond with when uploading an asset.
Is there a way to solve this problem?
For non-standard asset files, such as gltf or glb,
the limitation is that the file is limited to application/octet-stream.
The gltf file expects a response of model/gltf+json, and the glb file expects a response of model/gltf-binary.
At the script level, the mimeType can be changed or
I don’t think this problem can be solved other than the possibility of hooking and modifying DelegateAssetFile in AssetFileResolver when uploading.
When using API, it can be specified in multi-part, but when uploading in Web UI, form-upload is set as default, so it is default specified as octet-stream.
In this case, it can be solved by forking and modifying the frontend source code. However, when requesting asset get, I tried to receive it by looking at the fileName in the script query and modifying the mimetype, but it did not work.
For example, when processing a gltf file based on the asset API, it is processed correctly by specifying the content-type.
Internal workers use web UI, so they are fixed and uploaded as octet-stream.
Thats 100% not true. The browser defines the content type based on the file extension. When you use the API you have to define the correct content type.
Yes, that’s right. Some sentences may have been misrepresented by the translator.
The most realistic alternative would be to look at the fileName through query hooking in AssetScript, change the mimeType, and download it as a header. Is this a possible scenario?
There is a problem with these 3D-like assets that must be specified because the browser does not know the mime-type.
It seems that the problem will be solved if the mimeType is reflected in create/update in AssetScript.