Fix mime type returning for shared with others files

Use "path" instead of "file_target", as the latter is not always set /
reliable.

Please review @icewind1991 @schiesbn