Redo arm changes
This commit is contained in:
parent
619e2cff50
commit
c6cb3daf6e
@ -4,6 +4,7 @@ provider:
|
|||||||
name: aws
|
name: aws
|
||||||
runtime: python3.12
|
runtime: python3.12
|
||||||
stage: dev
|
stage: dev
|
||||||
|
architecture: arm64
|
||||||
iamRoleStatements:
|
iamRoleStatements:
|
||||||
- Effect: Allow
|
- Effect: Allow
|
||||||
Action:
|
Action:
|
||||||
|
14
twitfix.py
14
twitfix.py
@ -1,14 +1,18 @@
|
|||||||
from weakref import finalize
|
from weakref import finalize
|
||||||
from flask import Flask, render_template, request, redirect, abort, Response, send_from_directory, url_for, send_file, make_response, jsonify
|
from flask import Flask, render_template, request, redirect, abort, Response, send_from_directory, url_for, send_file, make_response, jsonify
|
||||||
|
|
||||||
|
from configHandler import config
|
||||||
|
remoteCombine='combination_method' in config['config'] and config['config']['combination_method'] != "local"
|
||||||
|
|
||||||
|
if not remoteCombine:
|
||||||
|
import combineImg
|
||||||
|
|
||||||
from flask_cors import CORS
|
from flask_cors import CORS
|
||||||
import re
|
|
||||||
import os
|
import os
|
||||||
import combineImg
|
|
||||||
from io import BytesIO, StringIO
|
from io import BytesIO, StringIO
|
||||||
import urllib
|
import urllib
|
||||||
import msgs
|
import msgs
|
||||||
import twExtract as twExtract
|
import twExtract as twExtract
|
||||||
from configHandler import config
|
|
||||||
from cache import addVnfToLinkCache,getVnfFromLinkCache
|
from cache import addVnfToLinkCache,getVnfFromLinkCache
|
||||||
import vxlogging as log
|
import vxlogging as log
|
||||||
from utils import getTweetIdFromUrl, pathregex
|
from utils import getTweetIdFromUrl, pathregex
|
||||||
@ -314,10 +318,10 @@ def rendercombined():
|
|||||||
# get "imgs" from request arguments
|
# get "imgs" from request arguments
|
||||||
imgs = request.args.get("imgs", "")
|
imgs = request.args.get("imgs", "")
|
||||||
|
|
||||||
if 'combination_method' in config['config'] and config['config']['combination_method'] != "local":
|
if remoteCombine:
|
||||||
|
# Redirecting here instead of setting the embed URL directly to this because if the config combination_method changes in the future, old URLs will still work
|
||||||
url = config['config']['combination_method'] + "/rendercombined.jpg?imgs=" + imgs
|
url = config['config']['combination_method'] + "/rendercombined.jpg?imgs=" + imgs
|
||||||
return redirect(url, 302)
|
return redirect(url, 302)
|
||||||
# Redirecting here instead of setting the embed URL directly to this because if the config combination_method changes in the future, old URLs will still work
|
|
||||||
|
|
||||||
imgs = imgs.split(",")
|
imgs = imgs.split(",")
|
||||||
if (len(imgs) == 0 or len(imgs)>4):
|
if (len(imgs) == 0 or len(imgs)>4):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user