mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Fixed bug with image upload
This commit is contained in:
parent
23e076f93a
commit
c6deb15437
@ -48,7 +48,7 @@ Also neat: You can use your **custom artist or track images**.
|
|||||||
|
|
||||||
3) Download Maloja with the command `pip install malojaserver`. Make sure to use the correct python version (Use `pip3` if necessary).
|
3) Download Maloja with the command `pip install malojaserver`. Make sure to use the correct python version (Use `pip3` if necessary).
|
||||||
|
|
||||||
4) (Recommended) Put your server behind a reverse proxy for SSL encryption.
|
4) (Recommended) Put your server behind a reverse proxy for SSL encryption. Make sure that you're proxying to the IPv6 address unless you changed your settings to use IPv4. If you're running Maloja in a container, make sure to expose port 32400 (or whichever port you have chosen in your settings).
|
||||||
|
|
||||||
### Update
|
### Update
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ author = {
|
|||||||
"email":"maloja@krateng.dev",
|
"email":"maloja@krateng.dev",
|
||||||
"github": "krateng"
|
"github": "krateng"
|
||||||
}
|
}
|
||||||
version = 2,2,3
|
version = 2,2,4
|
||||||
versionstr = ".".join(str(n) for n in version)
|
versionstr = ".".join(str(n) for n in version)
|
||||||
|
|
||||||
|
|
||||||
|
@ -409,8 +409,8 @@ def set_image(b64,**keys):
|
|||||||
b64 = base64.b64decode(b64)
|
b64 = base64.b64decode(b64)
|
||||||
filename = "webupload" + str(int(datetime.datetime.now().timestamp())) + "." + type
|
filename = "webupload" + str(int(datetime.datetime.now().timestamp())) + "." + type
|
||||||
for folder in get_all_possible_filenames(**keys):
|
for folder in get_all_possible_filenames(**keys):
|
||||||
if os.path.exists(folder):
|
if os.path.exists(datadir(folder)):
|
||||||
with open(os.path.join(folder,filename),"wb") as f:
|
with open(datadir(folder,filename),"wb") as f:
|
||||||
f.write(b64)
|
f.write(b64)
|
||||||
|
|
||||||
# set as current picture in rotation
|
# set as current picture in rotation
|
||||||
@ -419,8 +419,8 @@ def set_image(b64,**keys):
|
|||||||
return
|
return
|
||||||
|
|
||||||
folder = get_all_possible_filenames(**keys)[0]
|
folder = get_all_possible_filenames(**keys)[0]
|
||||||
os.makedirs(folder)
|
os.makedirs(datadir(folder))
|
||||||
with open(os.path.join(folder,filename),"wb") as f:
|
with open(datadir(folder,filename),"wb") as f:
|
||||||
f.write(b64)
|
f.write(b64)
|
||||||
|
|
||||||
# set as current picture in rotation
|
# set as current picture in rotation
|
||||||
|
Loading…
Reference in New Issue
Block a user