Work on hosted files and archives.
This commit is contained in:
@@ -122,17 +122,6 @@ class Archive_Content_Base(BaseModel):
|
||||
log.debug('NOT Found hosted_file_id_random...')
|
||||
return v
|
||||
|
||||
|
||||
|
||||
# @validator('account_id', always=True)
|
||||
# def account_id_lookup(cls, v, values, **kwargs):
|
||||
# log.setLevel(logging.WARNING)
|
||||
# log.debug(locals())
|
||||
|
||||
# if values['account_id_random']:
|
||||
# return redis_lookup_id_random(record_id_random=values['account_id_random'], table_name='account')
|
||||
# return None
|
||||
|
||||
class Config:
|
||||
underscore_attrs_are_private = True
|
||||
allow_population_by_field_name = True
|
||||
|
||||
@@ -111,7 +111,7 @@ async def get_archive_obj(
|
||||
exclude_unset: Optional[bool] = True,
|
||||
response: Response = Response,
|
||||
):
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
if archive_id := redis_lookup_id_random(record_id_random=archive_id, table_name='archive'): pass
|
||||
|
||||
@@ -147,8 +147,8 @@ async def download_hosted_file(
|
||||
if hosted_file_id := redis_lookup_id_random(record_id_random=hosted_file_id, table_name='hosted_file'): pass
|
||||
else: return mk_resp(data=None, status_code=404, response=commons.response, status_message='The hosted_file ID was invalid or not found.')
|
||||
|
||||
# hosted_files_path = settings.FILES_PATH['hosted_files_root']
|
||||
hosted_files_path = '/home/scott/tmp/hosted_files_dev/'
|
||||
hosted_files_path = settings.FILES_PATH['hosted_files_root']
|
||||
# hosted_files_path = '/home/scott/tmp/hosted_files_dev/'
|
||||
log.info(f'Hosted Files Path: {hosted_files_path}')
|
||||
|
||||
if hosted_file_obj := load_hosted_file_obj(
|
||||
|
||||
Reference in New Issue
Block a user