Skip to content

Commit

Permalink
hotfix / remove hard coded prefix handling of encrypted upload (#1344)
Browse files Browse the repository at this point in the history
* remove hard coded prefix handling of encrypted upload

* fix for other parts of the file
  • Loading branch information
devyetii authored Dec 25, 2023
1 parent 5697527 commit c4073cd
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions wasmsdk/blobber.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,7 @@ func multiUpload(jsonBulkUploadOptions string) (MultiUploadResult, error) {
wg.Add(1)
encrypt := option.Encrypt
remotePath := option.RemotePath
if strings.HasPrefix(remotePath, "/Encrypted") {
encrypt = true
}

fileReader := jsbridge.NewFileReader(option.ReadChunkFuncName, option.FileSize)
mimeType, err := zboxutil.GetFileContentType(fileReader)
if err != nil {
Expand Down Expand Up @@ -678,9 +676,7 @@ func uploadWithJsFuncs(allocationID, remotePath string, readChunkFuncName string
}
}
wg.Add(1)
if strings.HasPrefix(remotePath, "/Encrypted") {
encrypt = true
}


fileReader := jsbridge.NewFileReader(readChunkFuncName, fileSize)

Expand Down Expand Up @@ -760,9 +756,6 @@ func upload(allocationID, remotePath string, fileBytes, thumbnailBytes []byte, w
wg := &sync.WaitGroup{}
statusBar := &StatusBar{wg: wg}
wg.Add(1)
if strings.HasPrefix(remotePath, "/Encrypted") {
encrypt = true
}

fileReader := bytes.NewReader(fileBytes)

Expand Down

0 comments on commit c4073cd

Please sign in to comment.