Sometimes, with perfectly valid JPEG media, the pub async fn upload_media fails to recognise the media mime type at line
mime = infer::get(&file_bytes).unwrap().mime_type().to_string();
The error is
thread 'tokio-runtime-worker' panicked at 'called `Option::unwrap()` on a `None` value
It should not panic, ideally upload_media should accept an optional parameter with the media type to avoid this flawed detection
Sometimes, with perfectly valid JPEG media, the
pub async fn upload_mediafails to recognise the media mime type at linemime = infer::get(&file_bytes).unwrap().mime_type().to_string();The error is
It should not panic, ideally
upload_mediashould accept an optional parameter with the media type to avoid this flawed detection