rename postgr fucntions
This commit is contained in:
@@ -39,7 +39,7 @@ func GetKey(hash string, contentType string) string {
|
||||
return hash + extensionFromContentType(contentType)
|
||||
}
|
||||
|
||||
func MinInit() {
|
||||
func Init() {
|
||||
ctx := context.Background()
|
||||
|
||||
var err error
|
||||
@@ -65,14 +65,14 @@ func MinInit() {
|
||||
|
||||
}
|
||||
|
||||
func Upload(ctx context.Context, key string, body io.Reader, size int64, contentType string, uploader uuid.UUID) error {
|
||||
func Upload(ctx context.Context, key string, body io.Reader, size int64, contentType string, id uuid.UUID) error {
|
||||
_, err := minClient.PutObject(ctx, globals.FileStorageBucketName, key, body, size,
|
||||
minio.PutObjectOptions{
|
||||
ContentType: contentType,
|
||||
PartSize: globals.FileProcessingPartSize,
|
||||
NumThreads: globals.FileProcessingThreads,
|
||||
UserMetadata: map[string]string{
|
||||
"uploader": uploader.String(),
|
||||
"id": id.String(),
|
||||
},
|
||||
})
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user