Changing mime type of a binary field to an image type should trigger image processing
- Dominant language
- Java
- Stars
- 593
- Forks
- 123
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 4
Description
## Gentics Mesh Version, operating system, or hardware.
- v0.21.1
## Problem
When changing the mime type of a binary field (without uploading a new binary) and if the new type is a processable image type, Mesh does not extract image data from the binary.
## Reproducer
1. Create a node and upload an image with an incorrect mime type (e.g. `text/plain`)
2. Update the node and change the mime type of the binary. Example:
`POST` to `{{api}}/demo/nodes/9083b0f0f5a940fa83b0f0f5a9b0faa7`
```json
{
"language": "en",
"version": "2.0",
"fields": {
"image": {
"mimeType": "image/jpeg"
}
}
}
```
## Expected behaviour and actual behaviour
Expected the response to contain image information like height or width. Instead no such info is presented.
Contributor guide
Research direction
Start with the node update handling for binary fields and follow how mimeType changes are processed when no new binary is uploaded. Reproduce the POST request from the issue using an image first marked text/plain, then changed to image/jpeg; done means the response includes image metadata such as height and width.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100