[sync] updated: config based; async loop; Documents adopted to new system

This commit is contained in:
Roman Timashev committed 2017-09-10 22:12:09 +03:00
1 parent b0b518fd8c
commit 06965bebee
23 files changed
+1078 -346

No files matched your search

+5
View File
@@ -3,6 +3,7 @@ from io import BytesIO
import requests
import settings
from utils.fn import combine, lmap
@@ -96,6 +97,10 @@ def upload(file_path, relative_path):
"""
files = {'file': open(file_path, 'rb')}
url = 'https://static.shlisselburg.org/upload/art{}'.format(relative_path)
if not settings.upload_enabled:
return url
r = requests.put(
url=url,
files=files,