mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 05:44:58 +00:00
Refactor backend for getting signed url
This commit is contained in:
@@ -41,6 +41,7 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
class StoredObject implements Document, TrackCreationInterface
|
||||
{
|
||||
use TrackCreationTrait;
|
||||
final public const STATUS_EMPTY = 'empty';
|
||||
final public const STATUS_READY = 'ready';
|
||||
final public const STATUS_PENDING = 'pending';
|
||||
final public const STATUS_FAILURE = 'failure';
|
||||
@@ -98,7 +99,7 @@ class StoredObject implements Document, TrackCreationInterface
|
||||
*/
|
||||
public function __construct(
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, options: ['default' => 'ready'])]
|
||||
private string $status = 'ready'
|
||||
private string $status = 'empty'
|
||||
) {
|
||||
$this->uuid = Uuid::uuid4();
|
||||
$this->versions = new ArrayCollection();
|
||||
@@ -330,6 +331,10 @@ class StoredObject implements Document, TrackCreationInterface
|
||||
|
||||
$this->versions->add($version);
|
||||
|
||||
if ('empty' === $this->status) {
|
||||
$this->status = self::STATUS_READY;
|
||||
}
|
||||
|
||||
return $version;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user