im going to kill myself
parent
ee54cacaec
commit
71ccb856ce
|
@ -871,7 +871,7 @@ def submit_post(v):
|
||||||
new_post.url = upload_ibb(file)
|
new_post.url = upload_ibb(file)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
post_url = upload_imgur(file)
|
post_url = upload_video(file)
|
||||||
new_post.url = post_url
|
new_post.url = post_url
|
||||||
thing = gevent.spawn(check_processing_thread, new_post, post_url, g.db)
|
thing = gevent.spawn(check_processing_thread, new_post, post_url, g.db)
|
||||||
print(thing.started)
|
print(thing.started)
|
||||||
|
@ -890,13 +890,13 @@ def submit_post(v):
|
||||||
), 400
|
), 400
|
||||||
else:
|
else:
|
||||||
if file.content_type.startswith('image/'):
|
if file.content_type.startswith('image/'):
|
||||||
post_url = upload_imgur(file)
|
new_post.url = upload_imgur(file)
|
||||||
new_post.url = post_url
|
|
||||||
thing = gevent.spawn(check_processing_thread, new_post, post_url, g.db)
|
|
||||||
print(thing.started)
|
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
new_post.url = upload_video(file)
|
post_url = upload_video(file)
|
||||||
|
new_post.url = post_url
|
||||||
|
thing = gevent.spawn(check_processing_thread, new_post, post_url, g.db)
|
||||||
|
print(thing.started)
|
||||||
except UploadException as e:
|
except UploadException as e:
|
||||||
if request.headers.get("Authorization"):
|
if request.headers.get("Authorization"):
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue