mirror of https://gitlab.com/litecord/litecord.git
storage: fix attachment.url
This commit is contained in:
parent
6c992588e9
commit
54650161b9
|
|
@ -668,11 +668,9 @@ class Storage:
|
||||||
proto = 'https' if self.app.config['IS_SSL'] else 'http'
|
proto = 'https' if self.app.config['IS_SSL'] else 'http'
|
||||||
main_url = self.app.config['MAIN_URL']
|
main_url = self.app.config['MAIN_URL']
|
||||||
|
|
||||||
attachment_ext = get_ext(row['mime'])
|
|
||||||
|
|
||||||
drow['url'] = (f'{proto}://{main_url}/attachments/'
|
drow['url'] = (f'{proto}://{main_url}/attachments/'
|
||||||
f'{row["channel_id"]}/{row["message_id"]}/'
|
f'{row["channel_id"]}/{row["message_id"]}/'
|
||||||
f'{row["filename"]}.{attachment_ext}')
|
f'{row["filename"]}')
|
||||||
|
|
||||||
# NOTE: since the url comes from the instance itself
|
# NOTE: since the url comes from the instance itself
|
||||||
# i think proxy_url=url is valid.
|
# i think proxy_url=url is valid.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue