forked from forgejo/forgejo
Add size to Save function (#15264)
Fix #15253 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
3cc7d27b6f
commit
0bb8bd8190
7 changed files with 17 additions and 10 deletions
|
@ -66,7 +66,7 @@ func (l *LocalStorage) Open(path string) (Object, error) {
|
|||
}
|
||||
|
||||
// Save a file
|
||||
func (l *LocalStorage) Save(path string, r io.Reader) (int64, error) {
|
||||
func (l *LocalStorage) Save(path string, r io.Reader, size int64) (int64, error) {
|
||||
p := filepath.Join(l.dir, path)
|
||||
if err := os.MkdirAll(filepath.Dir(p), os.ModePerm); err != nil {
|
||||
return 0, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue