diff --git a/README.md b/README.md index 71d01b6..878b559 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Maintainability](https://api.codeclimate.com/v1/badges/369f0a7ff28279088d9c/maintainability)](https://codeclimate.com/github/petrsvihlik/WopiHost/maintainability) [![CodeFactor](https://www.codefactor.io/repository/github/petrsvihlik/wopihost/badge/master)](https://www.codefactor.io/repository/github/petrsvihlik/wopihost/overview/master) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fpetrsvihlik%2FWopiHost.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fpetrsvihlik%2FWopiHost?ref=badge_shield) -[![.NET Core](https://img.shields.io/badge/net-8-692079.svg)](https://dotnet.microsoft.com/download/dotnet/8.0) +[![.NET Core](https://img.shields.io/badge/net-9-692079.svg)](https://dotnet.microsoft.com/download/dotnet/9.0) | Package | Version | Downloads | | ------------- | :-------------: | :-------------: | @@ -15,20 +15,6 @@ | `WopiHost.FileSystemProvider` | [![NuGet](https://img.shields.io/nuget/v/WopiHost.FileSystemProvider.svg)](https://www.nuget.org/packages/WopiHost.FileSystemProvider) | [![NuGet](https://img.shields.io/nuget/dt/WopiHost.FileSystemProvider.svg)](https://www.nuget.org/packages/WopiHost.FileSystemProvider) | | `WopiHost.Url` | [![NuGet](https://img.shields.io/nuget/v/WopiHost.Url.svg)](https://www.nuget.org/packages/WopiHost.Url) | [![NuGet](https://img.shields.io/nuget/dt/WopiHost.Url.svg)](https://www.nuget.org/packages/WopiHost.Url) | -Supporters -========== - -Sponsors ---------- -scottgal - - - -Contributors ---------- -[![Contributors](https://contrib.rocks/image?repo=petrsvihlik/wopihost)](https://github.com/petrsvihlik/wopihost/graphs/contributors) - - Introduction ========== @@ -53,12 +39,12 @@ Usage Prerequisites ------------- - - [.NET 8 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) + - [.NET 9 SDK](https://dotnet.microsoft.com/download/dotnet/9.0) - Recommended: [VS Code](https://code.visualstudio.com/) or [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) Building the app ---------------- -The WopiHost app targets `net8.0` exclusively. +The WopiHost app targets `net9.0` exclusively. If you need a version that's targeting an older version of .NET, check out the releases: - [.NET 6](TBD) @@ -146,7 +132,7 @@ https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/ License ======= - [LICENSE.txt](https://github.com/petrsvihlik/WopiHost/blob/master/LICENSE.txt) - License for my part of the project - - [ORIGINAL_WORK_LICENSE.txt](https://github.com/petrsvihlik/WopiHost/blob/master/WopiHost.Cobalt/ORIGINAL_WORK_LICENSE.txt) - License for Marx Yu's part of the project. This project is based on [Marx Yu's project](https://github.com/marx-yu/WopiHost). + - [ORIGINAL_WORK_LICENSE.txt](https://github.com/petrsvihlik/WopiHost/blob/master/src/WopiHost.Cobalt/ORIGINAL_WORK_LICENSE.txt) - License for Marx Yu's part of the project. This project is based on [Marx Yu's project](https://github.com/marx-yu/WopiHost). - [NOTICE.txt](https://github.com/petrsvihlik/WopiHost/blob/master/NOTICE.txt) - additional notes to how the licenses are applied @@ -156,13 +142,12 @@ Building WOPI Host ----------------------- - [Official WOPI Documentation](https://learn.microsoft.com/microsoft-365/cloud-storage-partner-program/rest/) - [Official WOPI REST API Reference](https://learn.microsoft.com/openspecs/office_protocols/ms-wopi/6a8bb410-68ad-47e4-9dc3-6cf29c6b046b) - - [Building an Office Web Apps (OWA) WOPI Host by Shawn Cicoria](https://code.msdn.microsoft.com/office/Building-an-Office-Web-f98650d6) + [WOPI Host and url paths](https://www.cicoria.com/office-web-appswopi-host-and-url-paths/) + - [WOPI Host and url paths](https://www.cicoria.com/office-web-appswopi-host-and-url-paths/) - [Office Online integration via WOPI Host by Richard diZerega](https://github.com/OfficeDev/PnP-WOPI) + [video](https://www.youtube.com/watch?v=9lGonu0eoGA) MS-FSSHTTP (Cobalt) ------- - https://docs.microsoft.com/en-us/openspecs/sharepoint_protocols/ms-fsshttp/6d078cbe-2651-43a0-b460-685ac3f14c45 - - https://channel9.msdn.com/Events/Open-Specifications-Plugfests/Redmond-Interoperability-Protocols-Plugfest-2015/FSSHTTP-File-Synchronization-over-HTTP Building WOPI Client ------------------------- diff --git a/src/WopiHost.Core/Models/CheckContainerInfo.cs b/src/WopiHost.Core/Models/CheckContainerInfo.cs index a6d5cc7..ab5e5a9 100644 --- a/src/WopiHost.Core/Models/CheckContainerInfo.cs +++ b/src/WopiHost.Core/Models/CheckContainerInfo.cs @@ -20,7 +20,7 @@ public class CheckContainerInfo /// /// A URI to a webpage for the container. /// - public string HostUrl { get; set; } + public Uri HostUrl { get; set; } /// /// A Boolean value indicating whether the user is an education user or not. This should match the IsEduUser value returned in CheckFileInfo. @@ -35,7 +35,7 @@ public class CheckContainerInfo /// /// A URI to a webpage to allow the user to control sharing of the container. This is analogous to the FileSharingUrl in CheckFileInfo. /// - public string SharingUrl { get; set; } + public Uri SharingUrl { get; set; } /// /// A Boolean value that indicates the user has permission to create a new container in the container. diff --git a/src/WopiHost.Core/Models/CheckFileInfo.cs b/src/WopiHost.Core/Models/CheckFileInfo.cs index d187e62..7f8ffab 100644 --- a/src/WopiHost.Core/Models/CheckFileInfo.cs +++ b/src/WopiHost.Core/Models/CheckFileInfo.cs @@ -60,7 +60,7 @@ public class CheckFileInfo /// /// A URI to a web page that the WOPI client should navigate to when the user clicks on UI that displays . /// - public string BreadcrumbBrandUrl { get; set; } + public Uri BreadcrumbBrandUrl { get; set; } /// /// A string that indicates the name of the file. If this is not provided, WOPI clients may use the value. @@ -70,7 +70,7 @@ public class CheckFileInfo /// /// MAY specifies a URI to a web page that the WOPI client navigates to when the user clicks on UI that displays . /// - public string BreadcrumbDocUrl { get; set; } + public Uri BreadcrumbDocUrl { get; set; } /// /// A string that indicates the name of the container that contains the file. @@ -80,12 +80,12 @@ public class CheckFileInfo /// /// A URI to a web page that the WOPI client should navigate to when the user clicks on UI that displays . /// - public string BreadcrumbFolderUrl { get; set; } + public Uri BreadcrumbFolderUrl { get; set; } /// /// A user-accessible URI directly to the file intended for opening the file through a client. /// - public string ClientUrl { get; set; } + public Uri ClientUrl { get; set; } /// /// A Boolean value that indicates the WOPI client should close the window or tab when the user activates any Close UI in the WOPI client. @@ -95,7 +95,7 @@ public class CheckFileInfo /// /// A URI to a web page that the WOPI client should navigate to when the application closes, or in the event of an unrecoverable error. /// - public string CloseUrl { get; set; } + public Uri CloseUrl { get; set; } /// /// A Boolean value that indicates that the WOPI client should disable caching of file contents in the browser cache. Note that this has important performance implications for web browser-based WOPI clients. @@ -130,27 +130,27 @@ public class CheckFileInfo /// /// A user-accessible URI to the file intended to allow the user to download a copy of the file. This URI should directly download the file and it should always provide the most recent version of the file. /// - public string DownloadUrl { get; set; } + public Uri DownloadUrl { get; set; } /// /// A URI to a location that allows the user to create an embeddable URI to the file. /// - public string FileEmbedCommandUrl { get; set; } + public Uri FileEmbedCommandUrl { get; set; } /// /// A URI to a location that allows the user to share the file. /// - public string FileSharingUrl { get; set; } + public Uri FileSharingUrl { get; set; } /// /// A URI to the file location that the WOPI client uses to get the file. /// - public string FileUrl { get; set; } + public Uri FileUrl { get; set; } /// /// A URI to a location that allows the user to view the version history for the file. /// - public string FileVersionUrl { get; set; } + public Uri FileVersionUrl { get; set; } /// /// A string value uniquely identifying the user currently accessing the file. @@ -160,17 +160,17 @@ public class CheckFileInfo /// /// A URI to a host page that loads the edit WOPI action. /// - public string HostEditUrl { get; set; } + public Uri HostEditUrl { get; set; } /// /// A URI to a web page that provides access to an editing experience for the file that can be embedded in another HTML page. /// - public string HostEmbeddedEditUrl { get; set; } + public Uri HostEmbeddedEditUrl { get; set; } /// /// A URI to a web page that provides access to a viewing experience for the file that can be embedded in another HTML page. This is typically a URI to a host page that loads the embedview WOPI action. /// - public string HostEmbeddedViewUrl { get; set; } + public Uri HostEmbeddedViewUrl { get; set; } /// /// A string that is the name provided by the WOPI server used to identify it for logging and other informational purposes. @@ -185,12 +185,12 @@ public class CheckFileInfo /// /// A URI that is the base URI for REST operations for the file. /// - public string HostRestUrl { get; set; } + public Uri HostRestUrl { get; set; } /// /// A URI to a host page that loads the view WOPI action. This URL is used by Office Online to navigate between view and edit mode. /// - public string HostViewUrl { get; set; } + public Uri HostViewUrl { get; set; } /// /// A string that the WOPI client should display to the user indicating the IRM policy for the file. This value should be combined with . @@ -215,7 +215,7 @@ public class CheckFileInfo /// /// A URI to a webpage that explains the privacy policy of the WOPI server. /// - public string PrivacyUrl { get; set; } + public Uri PrivacyUrl { get; set; } /// /// A Boolean value that indicates that the WOPI client should take measures to prevent copying and printing of the file. @@ -226,7 +226,7 @@ public class CheckFileInfo /// A URI that will allow the user to sign in using the host’s authentication system. This property can be used when supporting anonymous users. If this property is not provided, no sign in UI will be shown in Office Online. /// See also /// - public string SignInUrl { get; set; } + public Uri SignInUrl { get; set; } /// /// A Boolean value that indicates that, for this user, the file cannot be changed. @@ -251,7 +251,7 @@ public class CheckFileInfo /// /// A URI that will sign the current user out of the host’s authentication system. /// - public string SignoutUrl { get; set; } + public Uri SignoutUrl { get; set; } /// /// A Boolean value that indicates that the WOPI server supports multiple users making changes to this file simultaneously. @@ -454,7 +454,7 @@ public bool SupportsFolders /// /// A URI to a webpage that explains the terms of use policy of the WOPI server. /// - public string TermsOfUseUrl { get; set; } + public Uri TermsOfUseUrl { get; set; } /// /// A string that is used to pass time zone information to a WOPI client. The format of this value is determined by the host.