mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
fix for file storing in webdav
This commit is contained in:
parent
74c65cf680
commit
7ea3935571
1 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@ map '/webdav' do
|
||||||
end
|
end
|
||||||
|
|
||||||
if Site.valid_file_type?(filename: path, tempfile: tmpfile)
|
if Site.valid_file_type?(filename: path, tempfile: tmpfile)
|
||||||
site.store_file path, tmpfile
|
site.store_files [{filename: path, tempfile: tmpfile}]
|
||||||
return [201, {}, ['']]
|
return [201, {}, ['']]
|
||||||
else
|
else
|
||||||
return [415, {}, ['']]
|
return [415, {}, ['']]
|
||||||
|
@ -51,7 +51,7 @@ map '/webdav' do
|
||||||
FileUtils.cp site.files_path(env['PATH_INFO']), tmpfile.path
|
FileUtils.cp site.files_path(env['PATH_INFO']), tmpfile.path
|
||||||
|
|
||||||
DB.transaction do
|
DB.transaction do
|
||||||
site.store_file destination, tmpfile
|
site.store_files [{filename: destination, tempfile: tmpfile}]
|
||||||
site.delete_file env['PATH_INFO']
|
site.delete_file env['PATH_INFO']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue