deleting and uploading files
This commit is contained in:
@@ -5,13 +5,14 @@ import (
|
||||
"os"
|
||||
|
||||
"git.ma-al.com/goc_daniel/b2b/app/model"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
type UIStorageRepo interface {
|
||||
EntryInfo(abs_path string) (os.FileInfo, error)
|
||||
ListContent(abs_path string) (*[]model.EntryInList, error)
|
||||
OpenFile(abs_path string) (*os.File, error)
|
||||
UploadFile(abs_path string, f *multipart.FileHeader) error
|
||||
UploadFile(c fiber.Ctx, abs_path string, f *multipart.FileHeader) error
|
||||
CreateFolder(abs_path string) error
|
||||
DeleteFile(abs_path string) error
|
||||
DeleteFolder(abs_path string) error
|
||||
@@ -50,8 +51,8 @@ func (r *StorageRepo) OpenFile(abs_path string) (*os.File, error) {
|
||||
return os.Open(abs_path)
|
||||
}
|
||||
|
||||
func (r *StorageRepo) UploadFile(abs_path string, f *multipart.FileHeader) error {
|
||||
return nil
|
||||
func (r *StorageRepo) UploadFile(c fiber.Ctx, abs_path string, f *multipart.FileHeader) error {
|
||||
return c.SaveFile(f, abs_path)
|
||||
}
|
||||
|
||||
func (r *StorageRepo) CreateFolder(abs_path string) error {
|
||||
|
||||
Reference in New Issue
Block a user