|
@ -39,8 +39,10 @@ func (sp FileSystemStorageProvider) StoreExisting(bucketName string, objectName |
|
|
return sp.StoreRaw(bucketName, objectName, bytesRead) |
|
|
return sp.StoreRaw(bucketName, objectName, bytesRead) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func GetFileSystemStorageProvider(basePath string) FileSystemStorageProvider { |
|
|
|
|
|
wd, _ := os.Getwd() |
|
|
|
|
|
|
|
|
func GetFileSystemStorageProvider(basePath string, wd string) FileSystemStorageProvider { |
|
|
|
|
|
if wd == "" { |
|
|
|
|
|
wd, _ = os.Getwd() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return FileSystemStorageProvider{ |
|
|
return FileSystemStorageProvider{ |
|
|
fileSystem: afero.NewBasePathFs(afero.NewOsFs(), filepath.Join(wd, "files")), |
|
|
fileSystem: afero.NewBasePathFs(afero.NewOsFs(), filepath.Join(wd, "files")), |
|
|