Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when uploading a file #138

Closed
satiricon opened this issue May 22, 2013 · 3 comments
Closed

Issue when uploading a file #138

satiricon opened this issue May 22, 2013 · 3 comments
Labels

Comments

@satiricon
Copy link

I am not sure if the problem is with this bundle but when I try to read some file properties of a recently uploaded file it throws this the error.

Warning: finfo::file(): File or path not found 'gaufrette://page_file_fs/f31e3f97190eba2a1c0fdc5b94cda4cb.jpeg' in /var/www/sitename/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php line 55 

And this is my conf

knp_gaufrette:
    stream_wrapper: ~
    adapters:
        page_adapter:
            local:
                directory: %kernel.root_dir%/../web/media/page
                create:     true
    filesystems:
        page_file_fs:
            adapter:    page_adapter

vich_uploader:
    db_driver: orm
    gaufrette: true
    storage: vich_uploader.storage.gaufrette
    mappings:
        page_item:
            uri_prefix: /media/page
            upload_destination: page_file_fs
            namer:  bn_web.namer_md5

In my dev box it works flawlessly but I can't make it work in the production server. I am maybe forgetting something? The upload actually works (the file is in the designated directory) but the code someplace tries to read the recently uploaded file with finfo and it fails.

Help?

@K-Phoen
Copy link
Collaborator

K-Phoen commented Dec 8, 2013

If it works on your dev machine but not in production, it probably means that a difference between these two environments is causing the bug, not the bundle itself.

Did you solve your issue?

@satiricon
Copy link
Author

No, not really. I tried to find the difference between the environments but to no avail. In the end I just had to quit using gaufrette and now it's working fine.

@ftassi
Copy link
Collaborator

ftassi commented Dec 9, 2013

I'm closing as it seems not related to the bundle.

@ftassi ftassi closed this as completed Dec 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants