microsoft / Office-Online-Test-Tools-and-Documentation

Office Online test tools and documentation
https://docs.microsoft.com/en-us/microsoft-365/cloud-storage-partner-program/
MIT License
233 stars 161 forks source link

[Word Online] Binary conversion fails if either HostViewUrl or HostEditUrl are omitted from PutRelativeFile response #313

Closed tylerbutler closed 4 years ago

tylerbutler commented 7 years ago

Both optional HostViewUrl and HostEditUrl properties must be included in the PutRelativeFile response, or the conversion will fail with a generic error. We are working on a fix for this issue.

In the meantime, the issue can be easily worked around by providing both HostViewUrl and HostEditUrl in the PutRelativeFile response.

tylerbutler commented 7 years ago

We are not planning to fix this behavior in Word Online. There are plenty of reasons why HostEditUrl and HostViewUrl should be included as a best practice anyway (see #192 and #324 for example), so we're planning to add a new validator test specifically for Office Online that requires these optional properties.

tylerbutler commented 4 years ago

Validator test was added in https://github.com/microsoft/wopi-validator-core/issues/30, so closing this.

Ashraf111 commented 6 months ago

hosturlerror i am facing this error would you please help me . I have modified this code for wopisrc value with empty string in wopisrc it have same error

private async Task GetFileUrlAsync(IWopiFile file, ClaimsPrincipal user, WopiActionEnum wopiAction = WopiActionEnum.View, WopiDocsTypeEnum wopiDocsType = WopiDocsTypeEnum.WopiDocs, WopiVersionableTypeEnum isVersionable = WopiVersionableTypeEnum.True) { string xxx = "https://wopistage.hoxro.com/wopi/files/"+file.Identifier;

 CheckFileInfoVm fileInfoVm = new CheckFileInfoVm();
 WopiClaimTypesVm claimTypesVm = await user.GetClaimInfoFromClaimIdentity();
 claimTypesVm.WopiSrc=xxx;