Skip to content

Commit

Permalink
feat(qn): remote file support custom name
Browse files Browse the repository at this point in the history
  • Loading branch information
jaronnie committed Feb 15, 2023
1 parent e638176 commit 8bde9d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/put.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ func getFinalKey(path string) string {

func putRemoteFile(path string, mac *qbox.Mac, bucket string, cfg storage.Config) {
finalKey := getFinalKey(path)
if LastSaveKey != "" {
finalKey = LastSaveKey
}

bm := storage.NewBucketManager(mac, &cfg)
res, err := bm.Fetch(path, bucket, filepath.Join(Dir, finalKey))
if err != nil {
Expand Down

0 comments on commit 8bde9d3

Please sign in to comment.