1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-12 04:36:32 +02:00

[ticket/15687] Add attachment filename to attachment URL

This will also fix the invalid requirements for the file parameter of the URL.

PHPBB3-15687
This commit is contained in:
Marc Alexander
2023-06-27 21:00:16 +02:00
parent d73b60781e
commit df6ab1a811
7 changed files with 68 additions and 11 deletions

View File

@ -1716,7 +1716,13 @@ class parse_message extends bbcode_firstpass
if (isset($this->plupload) && $this->plupload->is_active())
{
$download_url = $controller_helper->route('phpbb_storage_attachment', ['file' => (int) $new_entry['attach_id']]);
$download_url = $controller_helper->route(
'phpbb_storage_attachment',
[
'file' => (int) $new_entry['attach_id'],
'filename' => $attachment['real_filename'],
]
);
// Send the client the attachment data to maintain state
$json_response->send(array('data' => $this->attachment_data, 'download_url' => $download_url));