add exception for uploaded images
This commit is contained in:
parent
16d0e1a0d7
commit
ad5daaae95
@ -90,6 +90,11 @@ class AssetsController(GzipMixin, ModificationAwareController, metaclass=ABCMeta
|
|||||||
|
|
||||||
class OwrxAssetsController(AssetsController):
|
class OwrxAssetsController(AssetsController):
|
||||||
def getFilePath(self, file):
|
def getFilePath(self, file):
|
||||||
|
config = CoreConfig()
|
||||||
|
if file == "gfx/openwebrx-avatar.png":
|
||||||
|
file = config.get_data_directory() + "/receiver_avatar"
|
||||||
|
if os.path.exists(file) and os.path.isfile(file):
|
||||||
|
return file
|
||||||
return pkg_resources.resource_filename("htdocs", file)
|
return pkg_resources.resource_filename("htdocs", file)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user