PHRAS-3422 add link from record to expose assets

This commit is contained in:
aynsix
2021-04-23 15:31:42 +03:00
parent 9ff3e914d5
commit 61e3c71d4f

View File

@@ -126,9 +126,16 @@ class ExposeUploadWorker implements WorkerInterface
}
}
$instanceKey = $this->app['conf']->get(['main', 'key']);
// this is the unique reference for record in phraseanet and assets in expose
// instanceKey_basedID_record_id
$assetId = $instanceKey.'_'.$record->getId();
$requestBody = [
'publication_id' => $payload['publicationId'],
'description' => $description,
'asset_id' => $assetId,
'upload' => [
'type' => $record->getMimeType(),
'size' => $record->getSize(),