bugfgix
This commit is contained in:
parent
7423e2ec0c
commit
9dcfef14f6
@ -99,13 +99,11 @@ async def uapi_request(request, sor, caller_orgid, callerid, uapi, llm, params):
|
|||||||
def b64media2url(request, mediafile):
|
def b64media2url(request, mediafile):
|
||||||
env = request._run_ns
|
env = request._run_ns
|
||||||
entire_url = env.entire_url
|
entire_url = env.entire_url
|
||||||
debug(f'{request=}{type(request)}, {len(mediafile)=}, {entire_url=}')
|
|
||||||
if mediafile.startswith('data:'):
|
if mediafile.startswith('data:'):
|
||||||
try:
|
try:
|
||||||
fs = FileStorage()
|
fs = FileStorage()
|
||||||
fname = getFilenameFromBase64(mediafile)
|
fname = getFilenameFromBase64(mediafile)
|
||||||
fpath = fs._name2path(fname)
|
fpath = fs._name2path(fname)
|
||||||
debug(f'{env.keys()=},{fpath=},{fname=}')
|
|
||||||
base64_to_file(mediafile, fpath)
|
base64_to_file(mediafile, fpath)
|
||||||
path = fs.webpath(fpath)
|
path = fs.webpath(fpath)
|
||||||
return entire_url('/idfile?path=') + env.quote(path)
|
return entire_url('/idfile?path=') + env.quote(path)
|
||||||
|
|||||||
@ -30,6 +30,7 @@
|
|||||||
"widgettype":"VScrollPanel",
|
"widgettype":"VScrollPanel",
|
||||||
"options":{
|
"options":{
|
||||||
"css":"card",
|
"css":"card",
|
||||||
|
"bgcolor": "#def0f0",
|
||||||
"cwidth":16,
|
"cwidth":16,
|
||||||
"cheight":14
|
"cheight":14
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user