Work on hosted files and converting files
This commit is contained in:
@@ -101,7 +101,7 @@ def load_event_presenter_obj(
|
|||||||
if inc_event_device_list: pass
|
if inc_event_device_list: pass
|
||||||
|
|
||||||
if inc_event_file_list:
|
if inc_event_file_list:
|
||||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||||
log.info('Need to include event file list...')
|
log.info('Need to include event file list...')
|
||||||
|
|
||||||
from app.methods.event_file_methods import get_event_file_rec_list, load_event_file_obj
|
from app.methods.event_file_methods import get_event_file_rec_list, load_event_file_obj
|
||||||
|
|||||||
@@ -749,7 +749,8 @@ async def convert_file(
|
|||||||
link_to_type: str = Query(..., min_length=2, max_length=50),
|
link_to_type: str = Query(..., min_length=2, max_length=50),
|
||||||
link_to_id: str = Query(..., min_length=11, max_length=22),
|
link_to_id: str = Query(..., min_length=11, max_length=22),
|
||||||
|
|
||||||
filename: str = Query('automatic_pdf_to_img_conversion.webp', min_length=11, max_length=150),
|
# filename: str = Query('automatic_pdf_to_img_conversion.webp', min_length=2, max_length=150),
|
||||||
|
filename_no_ext: str = Query('automated_hosted_file_conversion', min_length=1, max_length=150),
|
||||||
# extension: str = Query('webp', min_length=1, max_length=15),
|
# extension: str = Query('webp', min_length=1, max_length=15),
|
||||||
|
|
||||||
from_type: str = 'pdf',
|
from_type: str = 'pdf',
|
||||||
@@ -834,8 +835,8 @@ async def convert_file(
|
|||||||
|
|
||||||
file_info = await save_file_to_hosted_file(
|
file_info = await save_file_to_hosted_file(
|
||||||
file_path = save_path,
|
file_path = save_path,
|
||||||
filename = 'automatic_pdf_to_img_conversion.webp',
|
filename = f'{filename_no_ext}.{to_type}',
|
||||||
extension = 'webp',
|
extension = to_type,
|
||||||
account_id = account_id,
|
account_id = account_id,
|
||||||
link_to_type = link_to_type,
|
link_to_type = link_to_type,
|
||||||
link_to_id = link_to_id,
|
link_to_id = link_to_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user