In T363506: Pass image objects to the logo detection service we discussed options to prevent the service from downloading an uploaded image via a stash URL, which has limitations in terms of security (see T362749#9785333), privacy (see T362749#9785550, T362749#9786161), and likely performance.
The agreed solution is to send a thumbnail image object to the logo detection service: investigate its feasibility.
Steps
- investigate if we can access Thumbor's results of stashed images from MediaWiki - SpecialUploadStash has an outputThumbFromStash method, which seems to indicate that it's possible
- the thumbnail should be 224x224 pixels
- decide the image serialization format,
e.g., binary ori.e., base64 - inform ML in
T363506#9794241T364551#9977031 - set up an internal API endpoint in Upload Wizard that
- accesses the stashed thumbnail
- sends it to a LiftWing internal endpoint - the logo detection service isn't exposed yet, so it might be worth trying with an available one
- includes a content length request header
- let the endpoint accept a filekey parameter
- let the endpoint accept a filename parameter as per T368624#9943707