fix: pass bucket as query arg, not as form data
This commit is contained in:
parent
6bee380e75
commit
c2cccc4b84
|
@ -74,9 +74,7 @@ func (s StorageServiceImpl) PutFileSmall(file io.ReadSeeker, bucket string, gene
|
||||||
|
|
||||||
resp, err := s.httpApi.R().
|
resp, err := s.httpApi.R().
|
||||||
SetPathParam("path", hashStr).
|
SetPathParam("path", hashStr).
|
||||||
SetFormData(map[string]string{
|
SetQueryParam("bucket", bucket).
|
||||||
"bucket": bucket,
|
|
||||||
}).
|
|
||||||
SetBody(file).Put("/api/worker/objects/{path}")
|
SetBody(file).Put("/api/worker/objects/{path}")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -102,9 +100,7 @@ func (s StorageServiceImpl) PutFile(file io.Reader, bucket string, hash []byte)
|
||||||
|
|
||||||
resp, err := s.httpApi.R().
|
resp, err := s.httpApi.R().
|
||||||
SetPathParam("path", hashStr).
|
SetPathParam("path", hashStr).
|
||||||
SetFormData(map[string]string{
|
SetQueryParam("bucket", bucket).
|
||||||
"bucket": bucket,
|
|
||||||
}).
|
|
||||||
SetBody(file).Put("/api/worker/objects/{path}")
|
SetBody(file).Put("/api/worker/objects/{path}")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue