馃崚 file: make sure to cancel reading if the worker was aborted
otherwise we end up stuck waiting for the thread to terminate while the thread is busy needlessly reading the file, when all we wanted was mimetype data.
(cherry picked from commit b9e5af7b)