1
votes

I have the following problem, I'm working in a Symfony 2 application using Sonata Media bundle for media upload, I'm hosting the app in Bluehost, and my question is, how can I override the default path of media upload in sonata media bundle?, because I need to upload to "public_html" directory instead of the default web directory?, thanks and kind regards/

1

1 Answers

1
votes

Take a look at possible configuration of Sonata Media Bundle.

As you can see, you can provide a destination path for your media files via filesystem configuration.

Default value is:

%kernel.root_dir%/../web/uploads/media                          

Custom path (media folder is on the same level as project folder):

sonata_media:
    filesystem:
        local:
            directory:  %kernel.root_dir%/../../media
            create:     false

create: true means that a specified directory will be created if it does not exist.