Fix multi part get

This commit is contained in:
Neeraj Gupta
2024-08-12 17:13:32 +05:30
parent 644827aea1
commit c62842e6bb
2 changed files with 5 additions and 5 deletions

View File

@@ -175,8 +175,8 @@ s3:
#
# Warning: For file-storage, do not specify buckets with any lock or versioning enabled.
# The application does not handle these cases. By default, we will use the derived-storage or hot storage bucket
# as the primary bucket for file-data storage.
# file-data-storage:
# as the primary bucket for file-data-config.
# file-data-config:
# mldata:
# primaryBucket:
# replicaBuckets: []

View File

@@ -26,10 +26,10 @@ func (repo *ObjectCleanupRepository) AddTempObject(tempObject ente.TempObject, e
var err error
if tempObject.IsMultipart {
_, err = repo.DB.Exec(`INSERT INTO temp_objects(object_key, expiration_time,upload_id,is_multipart, bucket_id)
VALUES($1, $2, $3, $4)`, tempObject.ObjectKey, expirationTime, tempObject.UploadID, tempObject.IsMultipart, tempObject.BucketId)
VALUES($1, $2, $3, $4, $5)`, tempObject.ObjectKey, expirationTime, tempObject.UploadID, tempObject.IsMultipart, tempObject.BucketId)
} else {
_, err = repo.DB.Exec(`INSERT INTO temp_objects(object_key, expiration_time)
VALUES($1, $2)`, tempObject.ObjectKey, expirationTime)
_, err = repo.DB.Exec(`INSERT INTO temp_objects(object_key, expiration_time, bucket_id)
VALUES($1, $2, $3)`, tempObject.ObjectKey, expirationTime, tempObject.BucketId)
}
return stacktrace.Propagate(err, "")
}