Jump to content

База знаний - Доп. поле - Загрузка файла


Recommended Posts

Создал страницу релизы как у вас на этом форуме.
Вопрос есть в дополнительном поле "Загрузчик файлов"
Расширения выставил zip и rar

1.png2.png

 

 

 

 

 

 

 

 

 

 

Вот такие настройки:
В шаблоне списка выводится автоматически и имеет ссылку на скачивание вот такую:
 

http://bget.ru/applications/cms/interface/file/file.php?record=19&database=2&file=monthly_2016_07%2FNulled_zip.0a58087279b71ee0b7798a23983ee1c4

все ОТЛИЧНО! файл скачивается и расширение остается .zip

А вот отображение в шаблоне записи, проблема в самом шаблоне я вывожу тегом {$record->customFieldDisplayByKey('file-nulled', 'display')} и ссылка получается:

http://bget.ru/uploads/monthly_2016_07/Nulled_zip.0a58087279b71ee0b7798a23983ee1c4

в чем соль:
При скачивании расширение  это ТОКЕН т.е. ".0a58087279b71ee0b7798a23983ee1c4"

 

Link to comment
Share on other sites

Подскажите как работает file
{file="$file" extension="[string]"}
Outputs the URL to a file stored by IPS4's file handling classes.

Can be used in CSS files.

Parameters
$file - Either an instance of the \IPS\File class, or a string representing the stored URL to the file
extension - The file storage extension used to originally store the file, e.g. calendar_Events. If none is specified,core_Attachment is assumed.

$file - понятно что url до файла, а вот extension что, как и зачем не могу понять
Подскажите кто что знает.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Ваша ссылка была автоматически строена.   Отображать как обычную ссылку

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...