Added possiblity to set `mime` for a new file; at the moment there is not validation w.r.t. the file extension: it should match `mime`