mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-09-05 23:56:50 +08:00
refactor: simplify storage path handling across various tasks and storage implementations
This commit is contained in:
@@ -51,6 +51,7 @@ func (l *Local) JoinStoragePath(path string) string {
|
||||
|
||||
func (l *Local) Save(ctx context.Context, r io.Reader, storagePath string) error {
|
||||
l.logger.Infof("Saving file to %s", storagePath)
|
||||
storagePath = l.JoinStoragePath(storagePath)
|
||||
|
||||
ext := filepath.Ext(storagePath)
|
||||
base := strings.TrimSuffix(storagePath, ext)
|
||||
|
||||
Reference in New Issue
Block a user