The task is to transfer the file for display as an attachment in a web form on the SharePoint site.
The .htm file itself forms 1C. There is an idea of transferring a file to a binary, writing data to a SQL table field and reading and converting it to a file on the site side. But with the reading and transformation of the problem - no experience.