mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Added an option to download a attachment via URL. Implemented secure attachments, which can not be accessed by URL and requires authentication.
This commit is contained in:
parent
d382021fee
commit
27a001b1d2
10 changed files with 266 additions and 5 deletions
|
@ -105,7 +105,11 @@ abstract class BaseAdminController extends AbstractController
|
|||
$attachments = $form['attachments'];
|
||||
foreach ($attachments as $attachment) {
|
||||
/** @var $attachment FormInterface */
|
||||
$this->attachmentSubmitHandler->handleFormSubmit($attachment->getData(), $attachment['file']->getData());
|
||||
$options = [
|
||||
'secure_attachment' => $attachment['secureFile']->getData(),
|
||||
'download_url' => $attachment['downloadURL']->getData()
|
||||
];
|
||||
$this->attachmentSubmitHandler->handleFormSubmit($attachment->getData(), $attachment['file']->getData(), $options);
|
||||
}
|
||||
|
||||
$em->persist($entity);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue