Improve LocalFileSystemProvider's error handling

This commit is contained in:
Yang Luo
2023-09-07 10:49:39 +08:00
parent 3459ef1479
commit 7318ee6e3a
2 changed files with 33 additions and 43 deletions

View File

@ -19,7 +19,7 @@ import "github.com/casdoor/oss"
func GetStorageProvider(providerType string, clientId string, clientSecret string, region string, bucket string, endpoint string) oss.StorageInterface {
switch providerType {
case "Local File System":
return NewLocalFileSystemStorageProvider(clientId, clientSecret, region, bucket, endpoint)
return NewLocalFileSystemStorageProvider()
case "AWS S3":
return NewAwsS3StorageProvider(clientId, clientSecret, region, bucket, endpoint)
case "MinIO":