Giter Club home page Giter Club logo

Comments (3)

sehmaschine avatar sehmaschine commented on July 29, 2024

that´s a misunderstanding (probably the documentation is not clear enough):

FILEBROWSER_MEDIA_ROOT: basically the same as djangos MEDIA_ROOT (definition-wise).
FILEBROWSER_DIRECTORY: folder withhin MEDIA_ROOT

it´s good to save "uploads" with the filebrowsefield, because when you need to serve your media, "uploads" is not within djangos MEDIA_ROOT and therefore needs to be saved to the database.

from django-filebrowser.

archatas avatar archatas commented on July 29, 2024

Then there is no point of having FILEBROWSER_MEDIA_ROOT setting if it can't be changed.

It's good to keep "uploads" out of database if

FILEBROWSER_MEDIA_URL = "/uploads/"

or

FILEBROWSER_MEDIA_URL = "http://uploads.example.com/"

from django-filebrowser.

 avatar commented on July 29, 2024

The commit above adresses this issue. You can now set FILEBROWSER_MEDIA_ROOT in order to browse files from a path different from Django's MEDIA_ROOT.

However, the preferred way to customize FB's media root and media url is to set these parameters on a custom storage object (see http://readthedocs.org/docs/django-filebrowser/en/latest/file_storages.html). It can be expected that FILEBROWSER_MEDIA_ROOT and FILEBROWSER_MEDIA_URL will not be used in the next major release of FileBrowser.

Regarding the other issue of having DIRECTORY (e.g., 'uploads/') saved in a database: This will stay as it is. Backward compatibility is one reason. The other reason is that you may work around the problem you're facing by setting FILEBROWSER_DIRECTORY='' (an empty string) and changing the storage engine's location (FILEBROWSER_MEDIA_ROOT) to whatever you like (e.g. MEDIA_ROOT + 'uploads/').

from django-filebrowser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.