forked from forgejo/forgejo
LFS support to be stored on minio (#12518)
* LFS support to be stored on minio * Fix test * Fix lint * Fix lint * Fix check * Fix test * Update documents and add migration for LFS * Fix some bugs
This commit is contained in:
parent
e4b3f35b8d
commit
7a5465fc56
18 changed files with 423 additions and 203 deletions
|
@ -34,7 +34,7 @@ func NewLocalStorage(bucket string) (*LocalStorage, error) {
|
|||
}
|
||||
|
||||
// Open a file
|
||||
func (l *LocalStorage) Open(path string) (io.ReadCloser, error) {
|
||||
func (l *LocalStorage) Open(path string) (Object, error) {
|
||||
return os.Open(filepath.Join(l.dir, path))
|
||||
}
|
||||
|
||||
|
@ -58,6 +58,11 @@ func (l *LocalStorage) Save(path string, r io.Reader) (int64, error) {
|
|||
return io.Copy(f, r)
|
||||
}
|
||||
|
||||
// Stat returns the info of the file
|
||||
func (l *LocalStorage) Stat(path string) (ObjectInfo, error) {
|
||||
return os.Stat(filepath.Join(l.dir, path))
|
||||
}
|
||||
|
||||
// Delete delete a file
|
||||
func (l *LocalStorage) Delete(path string) error {
|
||||
p := filepath.Join(l.dir, path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue