X-Git-Url: https://git.mdrn.pl/audio.git/blobdiff_plain/2d1d955bb3b4a5ca4dad1153c062c9ab3b6319e7..6a220b0ed7d874876b6a64c9e297af2da0d303de:/apps/archive/forms.py?ds=inline diff --git a/apps/archive/forms.py b/apps/archive/forms.py index 772ec0a..922bd28 100755 --- a/apps/archive/forms.py +++ b/apps/archive/forms.py @@ -23,7 +23,10 @@ class AudiobookForm(forms.ModelForm): if not os.path.isdir(FILES_PATH): os.makedirs(FILES_PATH) # save the file in model - m.source_file.save(os.path.basename(path), ExistingFile(path)) + + m.source_file.save( + os.path.join(FILES_PATH, os.path.basename(path)), + ExistingFile(path)) if commit: m.save()