5fd8f02e3c
Review findings on #109139 (the "aeskey half is already on main" claim was wrong): `_decrypt_file_bytes` restored base64 padding but the key was never percent-decoded, so `%2F`/`%3D` keys failed to decrypt and `_cache_media` returned None. And `_store_media` received the CDN's `application/octet-stream` as the image MIME, which the gateway image classifier rejects even with the corrected `.png` name. Decode the key once at the payload boundary; for images forward the response MIME only when it is `image/*`, otherwise derive it from the resolved extension. Covered by one end-to-end test through `_cache_media` (red on the previous head).