Remove additional log, add content_html
This commit is contained in:
parent
04b1d688d5
commit
08680351e4
@ -68,6 +68,20 @@ class ContentSharePointManager:
|
|||||||
content_directory.summary_text = file_content
|
content_directory.summary_text = file_content
|
||||||
elif sp_file["name"].lower() == ContentFileConstants.TITLE_FILE_NAME.lower():
|
elif sp_file["name"].lower() == ContentFileConstants.TITLE_FILE_NAME.lower():
|
||||||
content_directory.title_text = file_content
|
content_directory.title_text = file_content
|
||||||
|
elif (
|
||||||
|
sp_file["name"].lower()
|
||||||
|
== ContentFileConstants.CONTENT_HTML_FILE_NAME.lower()
|
||||||
|
):
|
||||||
|
content_directory.content_html = self.sharepoint_client.get_file_content(
|
||||||
|
sp_file["id"]
|
||||||
|
)
|
||||||
|
elif (
|
||||||
|
sp_file["name"].lower()
|
||||||
|
== ContentFileConstants.CONTENT_TEXT_FILE_NAME.lower()
|
||||||
|
):
|
||||||
|
content_directory.content_text = self.sharepoint_client.get_file_content(
|
||||||
|
sp_file["id"]
|
||||||
|
)
|
||||||
elif (
|
elif (
|
||||||
sp_file["name"].lower()
|
sp_file["name"].lower()
|
||||||
== ContentFileConstants.CONTENT_PDF_FILE_NAME.lower()
|
== ContentFileConstants.CONTENT_PDF_FILE_NAME.lower()
|
||||||
|
|||||||
@ -29,7 +29,6 @@ class DocumentManager:
|
|||||||
) -> str:
|
) -> str:
|
||||||
api_url = self.storage_service_api_base + "upload-file"
|
api_url = self.storage_service_api_base + "upload-file"
|
||||||
files = {"file": (name, blob)}
|
files = {"file": (name, blob)}
|
||||||
print("this is files", files)
|
|
||||||
async with httpx.AsyncClient() as client:
|
async with httpx.AsyncClient() as client:
|
||||||
response = await client.post(
|
response = await client.post(
|
||||||
api_url, data={"associated_with": associated_with}, files=files
|
api_url, data={"associated_with": associated_with}, files=files
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user