mirror of
https://github.com/morpheus65535/bazarr
synced 2025-03-15 00:18:48 +00:00
no log: fixed static folder path in dev environment
This commit is contained in:
parent
9c92dd493b
commit
80414c08ab
1 changed files with 8 additions and 2 deletions
|
@ -24,9 +24,15 @@ ui_bp = Blueprint('ui', __name__,
|
|||
'build', 'assets'),
|
||||
static_url_path='/assets')
|
||||
|
||||
if os.path.exists(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))),'frontend', 'build',
|
||||
'images')):
|
||||
static_directory = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'frontend', 'build',
|
||||
'images')
|
||||
else:
|
||||
static_directory = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'frontend', 'public',
|
||||
'images')
|
||||
static_bp = Blueprint('images', __name__,
|
||||
static_folder=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))),
|
||||
'frontend', 'build', 'images'), static_url_path='/images')
|
||||
static_folder=static_directory, static_url_path='/images')
|
||||
|
||||
ui_bp.register_blueprint(static_bp)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue