#1442: Ошибка скачки файла

parent 565f35ab
......@@ -53,7 +53,7 @@ class BidFile extends \common\components\ActiveRecordModel
[['bid_id'], 'required'],
[['bid_id'], 'integer'],
[['filename'], 'string', 'max' => 100],
[['file'], 'file', 'skipOnEmpty' => true, 'extensions' => 'png, jpg, jpeg, gif, xls, xlsx, doc, docx, pdf', 'maxFiles' => 4],
[['file'], 'file', 'skipOnEmpty' => true, 'extensions' => 'xls, doc, docx, xlsx, png, jpeg, gif, bmp, jpg, zip, rar, tar, pptx, ppt', 'maxFiles' => 4],
[['bid_id'], 'exist', 'skipOnError' => true, 'targetClass' => Bid::className(), 'targetAttribute' => ['bid_id' => 'id']],
];
}
......
......@@ -8,8 +8,9 @@ $(document).ready(function() {
url: "/bids/bid/upload-files",
maxFiles: 4,
addRemoveLinks: true,
acceptedFiles: '.xls,.doc,.docx,.xlsx,.png,.jpeg,.gif,.bmp,jpg,.zip,.rar,.tar',
acceptedFiles: '.xls,.doc,.docx,.xlsx,.png,.jpeg,.gif,.bmp,.jpg,.zip,.rar,.tar,.pptx,.ppt',
dictRemoveFile: 'Удалить',
dictInvalidFileType: 'Приложенный файл не может быть загружен в целях безопасности. Пожалуйста, приложите файл в другом формате (Word, Pdf, PowerPoint, Excel).',
success: function(first, response)
{
$('#files-zone').append('<input type="hidden" name="Bid[file][]" value="'+response.filename+'" />');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment