Restore command (#593)
Add waiting for changes to config file Add max size for config files Restore files Restore database file Expose migrate to Move init stuff to seperate package Add restoring config file Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/api/pulls/593
This commit is contained in:
@ -96,7 +96,7 @@ func Create(f io.ReadCloser, realname string, realsize uint64, a web.Auth) (file
|
||||
}
|
||||
|
||||
// Save the file to storage with its new ID as path
|
||||
err = afs.WriteReader(file.getFileName(), f)
|
||||
err = file.Save(f)
|
||||
return
|
||||
}
|
||||
|
||||
@ -113,3 +113,8 @@ func (f *File) Delete() (err error) {
|
||||
err = afs.Remove(f.getFileName())
|
||||
return
|
||||
}
|
||||
|
||||
// Save saves a file to storage
|
||||
func (f *File) Save(fcontent io.ReadCloser) error {
|
||||
return afs.WriteReader(f.getFileName(), fcontent)
|
||||
}
|
||||
|
Reference in New Issue
Block a user