Upload fixes

This commit is contained in:
Dennis Eichhorn 2016-05-26 22:53:58 +02:00
parent 918ca094aa
commit 5509176eed
2 changed files with 4 additions and 0 deletions

View File

@ -59,6 +59,8 @@
return this.files.length;
};
// todo: maybe do file upload together with data upload in FormData.
// let the module forward the files to the media module?!
jsOMS.Modules.Models.Media.Upload.prototype.upload = function (formId)
{
// TODO: validate file type + file size

View File

@ -36,6 +36,8 @@ echo $this->getData('nav')->render();
</table>
<?php if(in_array($media->getExtension(), ['gif', 'bmp', 'jpg', 'jpeg', 'png'])) : ?>
<img src="<?= $this->request->getUri()->getBase() . $media->getPath(); ?>">
<?php elseif($media->getExtension() === 'collection') : ?>
collection
<?php else : ?>
<pre>
<?php