}
if (_media != NULL && STRING_VALID(_media->media_id) && STRING_VALID(_media->file_path)) {
+ if (g_strcmp0(_media->mime_type, "image/jpeg") != 0 && g_strcmp0(_media->mime_type, "image/png") != 0 && g_strcmp0(_media->mime_type, "image/bmp") != 0) {
+ media_content_error("Unsupported mime type");
+ return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+ }
+
memset(repl_path, 0, sizeof(repl_path));
ret = _media_content_replace_path(_media->file_path, repl_path);
media_content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");