Fix GCS Upload Metadata Mistake

This commit is contained in:
Ra'Jiska 2022-10-06 14:41:37 +08:00
parent 8dded4e8e4
commit 8dbe60621d

View File

@ -112,13 +112,18 @@ class GoogleCloudStorage extends AbstractData
*/
private function _upload($key, $payload)
{
$metadata = array_key_exists('meta', $payload) ? $payload['meta'] : array();
unset($metadata['attachment'], $metadata['attachmentname'], $metadata['salt']);
foreach ($metadata as $k => $v) {
$metadata[$k] = strval($v);
}
try {
$data = array(
'name' => $key,
'chunkSize' => 262144,
'metadata' => array(
'content-type' => 'application/json',
'metadata' => $payload,
'metadata' => $metadata,
),
);
if (!self::$_uniformacl) {