ValueError on using File from Falsk upload


very nice Lirary, thank you for that! But I have one issue. I would like to extract metadata form an uploaded file in Flask.

This works when I do:

file = request.files[‘file’]
filename = secure_filename(file.filename)
metadata = audio_metadata.load(filename)

But I dont want to cache the file on disk. When I do:

metadata = audio_metadata.load(file)
metadata = audio_metadata.loads(file)
metadata = audio_metadata.load(

I always get errors.

Any hint what I’m doing wrong?

Thanks Marco