@radib,
Regarding the second question, I was able to replicate the error. This was due to missing attributes in the Doconut-Cloud-Config.json file. In order to fix this issue, you must add these variables:
"DoconutAwsS3BucketName": "",
"DoconutAwsS3Key": "",
"DoconutAwsS3Secret": "",
"DoconutAwsS3RegionEndpoint": ""
The file needs to be in the following folder:
\wwwroot\webfarm\
In case you need to know the basic structure of the file, here is a sample:
{
"DoconutCdnUrl": "",
"FunctionsConfig": {
"CachePages": false,
"CacheInMemory": false,
"CacheTimeMinutes": 60,
"Search": false,
"Annotation": false,
"RotateFlip": false,
"Links": false,
"Watermark": false,
"Hide": false
},
"Location": 5,
"Token": "",
"DefaultConfigFallBack": true,
"SaveConfigToDisk": true,
"SaveConfigToCache": false,
"PerDocumentFunctions": false,
"LogErrors": false,
"ConfigCacheTimeMinutes": 60,
"TokenPath": "/",
"WebfarmPath": "C:\\Core.Cloud\\wwwroot\\webfarm\\",
"DoconutAwsS3BucketName": "",
"DoconutAwsS3Key": "",
"DoconutAwsS3Secret": "",
"DoconutAwsS3RegionEndpoint": ""
}
Regarding your third question, you can always use streams in memory instead of saving them to disk. For example, you can use the following method from the IFormFile control:
var stream = file.OpenReadStream();
var fileInfo = new FileInfo(file.FileName);
Then, you can use the stream and fileInfo as parameters for the OpenDocument method:
string token = docViewer.OpenDocument(streamFile, fileInfo);
With this code, the file will not be written to your local disk, and it will be saved directly into the cloud.
Now, regarding the iframes, they used to work several years ago. However, that has changed. It does not matter if they are in the same domain; the restrictions do not allow them to work.
Let me know if you have any other related questions.