Open Chrysweel opened 11 years ago
Hello @Chrysweel , in old versions you have to register stream manually in bundle boot method or if you use version from master you can do it in such way: https://github.com/KnpLabs/KnpGaufretteBundle#stream-wrapper
Old version code example:
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Gaufrette\StreamWrapper;
class MyBundle extends Bundle
{
public function boot()
{
$filesystemMap = $this->container->get('knp_gaufrette.filesystem_map');
$streamMap = StreamWrapper::getFilesystemMap();
$streamMap->set(
'product_image_fs',
$filesystemMap->get('product_image_fs')
);
$streamMap->set(
'imagen_perfil_fs',
$filesystemMap->get('imagen_perfil_fs')
);
StreamWrapper::register();
}
}
I'm not sure if it's related or not but I had once a problem if the root folder of the stream is a symlink then is_dir
or is_file
are not working as expected.
ie. /var/www/app/web/upload -> /data/files
and the stream is pointing to /var/www/app/web/upload
, this was not working for me (I think it's a PHP issue).
On the other hand if the stream was pointing to a subfolder, then it was working, ie. /var/www/app/web/upload/files
I have the same issue and i use the vich_uploader too.
The Version of Gaufrette is: "knplabs/knp-gaufrette-bundle": "0.2.@dev", "knplabs/gaufrette": "0.2.@dev",
As i added in my config.yml: stream_wrapper: ~
The Error was away. But i became other error:
The mime type of the file is invalid ("application/ogg"). Allowed mime types are "video/mpeg", "video/mp4", "video/ogg", "video/quicktime", "video/webm", "video/x-matroska", "video/x-ms-wmv", "video/x-flv".
This mime typ is declared on vich_uploader bundle. The fileattribute was not used on edit mode. But i can not unterstand why check filetype on edit mode?
Hello.
I have a problem. I get the following error when I want edit my email with FOSUSerBundle.
My config.yml is:
Any idea? Thanks!!