route element file uploads
Add short and long PDF paths to elements, keep pdfPath as a short PDF compatibility alias, and route generic file uploads by fileType.
This commit is contained in:
parent
0d5783ba9c
commit
9bbabc7fa6
28 changed files with 686 additions and 214 deletions
|
|
@ -35,7 +35,12 @@ class CreateElement
|
|||
? null
|
||||
: $request->iconImageUrl;
|
||||
$richText = $request->richText ?? '';
|
||||
$pdfPath = $request->pdfPath === '' ? null : $request->pdfPath;
|
||||
$shortPdfPath = $request->shortPdfPath === ''
|
||||
? null
|
||||
: $request->shortPdfPath;
|
||||
$longPdfPath = $request->longPdfPath === ''
|
||||
? null
|
||||
: $request->longPdfPath;
|
||||
$youtubeUrl = $request->youtubeUrl === ''
|
||||
? null
|
||||
: $request->youtubeUrl;
|
||||
|
|
@ -56,7 +61,8 @@ class CreateElement
|
|||
description: $description,
|
||||
iconImageUrl: $iconImageUrl,
|
||||
richText: $richText,
|
||||
pdfPath: $pdfPath,
|
||||
shortPdfPath: $shortPdfPath,
|
||||
longPdfPath: $longPdfPath,
|
||||
youtubeUrl: $youtubeUrl,
|
||||
parentElement: null,
|
||||
));
|
||||
|
|
@ -82,7 +88,8 @@ class CreateElement
|
|||
description: $description,
|
||||
iconImageUrl: $iconImageUrl,
|
||||
richText: $richText,
|
||||
pdfPath: $pdfPath,
|
||||
shortPdfPath: $shortPdfPath,
|
||||
longPdfPath: $longPdfPath,
|
||||
youtubeUrl: $youtubeUrl,
|
||||
parentElement: $parentElement,
|
||||
));
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ class CreateElementRequest
|
|||
public ?string $description,
|
||||
public ?string $iconImageUrl,
|
||||
public ?string $richText,
|
||||
public ?string $pdfPath,
|
||||
public ?string $shortPdfPath,
|
||||
public ?string $longPdfPath,
|
||||
public ?string $youtubeUrl,
|
||||
public ?int $parentElementId,
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue