Im here with another Question regarding Group Docs. We have a Cloud Service for Building Management and are trying to integrate the libary as efficient as possible. To distribute the load of the viewer, we thought about a dedicated Server (Instance). I uploaded a sketch, how this might work. pnw is the name of the cloud service.Integration Group Docs.png (5.8 KB)
Thanks in advance!
Can your Demo Application support this? Ideal would be if the communication between the cloud and the server would work with a REST API.
Please take a look at the following sample application which you can use to pass the file name or file ID as a query string parameter /viewer?file=<my-file-id> and than read a file in your storage implementation
class MyFileStorage : IFileStorage
{
public Task<IEnumerable<FileSystemEntry>> ListDirsAndFilesAsync(string dirPath)
{
//...
}
public Task<byte[]> ReadFileAsync(string filePath)
{
return File.ReadAllBytesAsync("./Storage/sample.docx");
}
public Task<string> WriteFileAsync(string fileName, byte[] bytes, bool rewrite)
{
//...
}
}