fix: update path in public archive
This commit is contained in:
@@ -110,8 +110,9 @@ class CustomFormExportWizardView(FormExportWizardView):
|
||||
class ArchiveFilerPublic(View):
|
||||
|
||||
def get(self, request):
|
||||
path = '/app/data/media/filer_public/'
|
||||
with zipfile.ZipFile('filer_public.zip', 'w', zipfile.ZIP_DEFLATED) as zipf:
|
||||
for root, dirs, files in os.walk('/app/data/media/filer_public/'):
|
||||
for root, dirs, files in os.walk(path):
|
||||
for file in files:
|
||||
zipf.write(os.path.join(root, file), os.path.relpath(os.path.join(root, file), os.path.join(path, '..')))
|
||||
return HttpResponse('success')
|
||||
|
||||
Reference in New Issue
Block a user