ValueError on using File from Falsk upload

Hi,

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)
file.save(filename))
metadata = audio_metadata.load(filename)

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

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

I always get errors.

Any hint what I’m doing wrong?

Thanks Marco