From 11fc9889df1a83056095449c203e7fc4ed9be1de 2021-10-29 15:42:54 From: Juan C. Espinoza Date: 2021-10-29 15:42:54 Subject: [PATCH] Fix bug in upload --- diff --git a/source/madpy/djangoMad/apps/updata/views.py b/source/madpy/djangoMad/apps/updata/views.py index 8a90116..17f7d0a 100755 --- a/source/madpy/djangoMad/apps/updata/views.py +++ b/source/madpy/djangoMad/apps/updata/views.py @@ -72,8 +72,8 @@ def index(request): ) else: fs = FileSystemStorage(location='/tmp') - fs.save(f.name, f) - filename = os.path.join('/tmp', f.name) + fs.save(files[0].name, files[0]) + filename = os.path.join('/tmp', files[0].name) ext = filename.split('.')[-1] if ext not in ('hdf5', 'h5'): convert = True