diff --git a/app/routers/hosted_file.py b/app/routers/hosted_file.py index bbbfb1b..b45b8b0 100644 --- a/app/routers/hosted_file.py +++ b/app/routers/hosted_file.py @@ -201,10 +201,10 @@ async def download_hosted_file( log.info(f'Full file path with subdirectory: {file_path_w_subdir}') if os.path.exists(file_path_w_subdir): - # log.info('Hosted file found on server.') - # return FileResponse(file_path_w_subdir, filename=filename) - log.info('Hosted file found on server.') + return FileResponse(file_path_w_subdir, filename=filename) + + # log.info('Hosted file found on server.') # if streaming: # log.warning('Streaming!!!') # def iterfile(): # @@ -212,8 +212,6 @@ async def download_hosted_file( # yield from file_like # # return StreamingResponse(iterfile(), media_type='video/mp4') # else: - - return FileResponse(file_path_w_subdir, filename=filename) else: log.error(f'The hosted file was not found on the server. Hash: {hash_sha256}') return mk_resp(data=None, status_code=404, response=commons.response, status_message=f'The hosted file was not found on the server. Hash: {hash_sha256}') # Not Found