Improve the s3 uploader for better performance.

Signed-off-by: dkkb <dabkb@aol.com>
This commit is contained in:
dkkb
2021-06-15 16:53:02 +08:00
parent d97bdffd94
commit 3ec5a5aea6
9 changed files with 58 additions and 16 deletions

View File

@@ -16,16 +16,14 @@ limitations under the License.
package s3
import (
"io"
)
import "io"
type Interface interface {
//read the content, caller should close the io.ReadCloser.
Read(key string) ([]byte, error)
// Upload uploads a object to storage and returns object location if succeeded
Upload(key, fileName string, body io.Reader) error
Upload(key, fileName string, body io.Reader, size int) error
GetDownloadURL(key string, fileName string) (string, error)