media: check correctly when file is an object

Fix bug when we pass a `File` object in client-side using media#addFiles() method