mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix construct of SignedUrlPost
This commit is contained in:
parent
21b79c1981
commit
2adc8b3bf6
@ -89,6 +89,7 @@ final readonly class TempUrlOpenstackGenerator implements TempUrlGeneratorInterf
|
|||||||
$g = new SignedUrlPost(
|
$g = new SignedUrlPost(
|
||||||
$url = $this->generateUrl($object_name),
|
$url = $this->generateUrl($object_name),
|
||||||
$expires,
|
$expires,
|
||||||
|
$object_name,
|
||||||
$this->max_post_file_size,
|
$this->max_post_file_size,
|
||||||
$max_file_count,
|
$max_file_count,
|
||||||
$submit_delay,
|
$submit_delay,
|
||||||
|
@ -18,6 +18,7 @@ readonly class SignedUrlPost extends SignedUrl
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
string $url,
|
string $url,
|
||||||
\DateTimeImmutable $expires,
|
\DateTimeImmutable $expires,
|
||||||
|
string $object_name,
|
||||||
#[Serializer\Groups(['read'])]
|
#[Serializer\Groups(['read'])]
|
||||||
public int $max_file_size,
|
public int $max_file_size,
|
||||||
#[Serializer\Groups(['read'])]
|
#[Serializer\Groups(['read'])]
|
||||||
@ -31,6 +32,6 @@ readonly class SignedUrlPost extends SignedUrl
|
|||||||
#[Serializer\Groups(['read'])]
|
#[Serializer\Groups(['read'])]
|
||||||
public string $signature,
|
public string $signature,
|
||||||
) {
|
) {
|
||||||
parent::__construct('POST', $url, $expires);
|
parent::__construct('POST', $url, $expires, $object_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,6 +154,7 @@ class TempUrlOpenstackGeneratorTest extends TestCase
|
|||||||
$signedUrl = new SignedUrlPost(
|
$signedUrl = new SignedUrlPost(
|
||||||
'https://objectstore.example/v1/my_account/container/object?temp_url_sig=0aeef353a5f6e22d125c76c6ad8c644a59b222ba1b13eaeb56bf3d04e28b081d11dfcb36601ab3aa7b623d79e1ef03017071bbc842fb7b34afec2baff895bf80&temp_url_expires=1702043543',
|
'https://objectstore.example/v1/my_account/container/object?temp_url_sig=0aeef353a5f6e22d125c76c6ad8c644a59b222ba1b13eaeb56bf3d04e28b081d11dfcb36601ab3aa7b623d79e1ef03017071bbc842fb7b34afec2baff895bf80&temp_url_expires=1702043543',
|
||||||
\DateTimeImmutable::createFromFormat('U', '1702043543'),
|
\DateTimeImmutable::createFromFormat('U', '1702043543'),
|
||||||
|
$objectName,
|
||||||
150,
|
150,
|
||||||
1,
|
1,
|
||||||
1800,
|
1800,
|
||||||
|
@ -73,6 +73,7 @@ class AsyncUploadControllerTest extends TestCase
|
|||||||
return new SignedUrlPost(
|
return new SignedUrlPost(
|
||||||
'https://object.store.example',
|
'https://object.store.example',
|
||||||
new \DateTimeImmutable('1 hour'),
|
new \DateTimeImmutable('1 hour'),
|
||||||
|
'abc'
|
||||||
150,
|
150,
|
||||||
1,
|
1,
|
||||||
1800,
|
1800,
|
||||||
|
@ -38,6 +38,7 @@ class SignedUrlPostNormalizerTest extends KernelTestCase
|
|||||||
$signedUrl = new SignedUrlPost(
|
$signedUrl = new SignedUrlPost(
|
||||||
'https://object.store.example/container/object',
|
'https://object.store.example/container/object',
|
||||||
\DateTimeImmutable::createFromFormat('U', '1700000'),
|
\DateTimeImmutable::createFromFormat('U', '1700000'),
|
||||||
|
'abc',
|
||||||
15000,
|
15000,
|
||||||
1,
|
1,
|
||||||
180,
|
180,
|
||||||
@ -59,6 +60,7 @@ class SignedUrlPostNormalizerTest extends KernelTestCase
|
|||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
'expires' => 1_700_000,
|
'expires' => 1_700_000,
|
||||||
'url' => 'https://object.store.example/container/object',
|
'url' => 'https://object.store.example/container/object',
|
||||||
|
'object_name' => 'abc'
|
||||||
],
|
],
|
||||||
$actual
|
$actual
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user