mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
Compare commits
26 Commits
v7.2.0.124
...
v7.2.1.37
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a656c025f | |||
| ce9930e5bc | |||
| 9da22d7803 | |||
| d78c677c99 | |||
| b204142c13 | |||
| fd1c26ab9f | |||
| 5993d10bee | |||
| c5771c9008 | |||
| 2fad227272 | |||
| ada438ff0b | |||
| 0dbd65a577 | |||
| 48e5b8d4e0 | |||
| 7f08a96681 | |||
| 3549b4bc2a | |||
| c9265d9ddc | |||
| 44d9ca88c6 | |||
| d964b43087 | |||
| 5a0debd9e8 | |||
| 3b0f942eee | |||
| 4ee110c2d5 | |||
| ad1d93dd20 | |||
| d2d98df5ab | |||
| 7805f7dc91 | |||
| 51ec27d67c | |||
| 9e94716df0 | |||
| 988a8339b1 |
@ -1,5 +1,6 @@
|
||||
# Change Log
|
||||
|
||||
## 1.4.0
|
||||
- nodejs: option to send directUrl
|
||||
- opening file on client by directUrl
|
||||
- offline viewer for anonymous
|
||||
|
||||
@ -334,7 +334,7 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
// get url to download a file
|
||||
public static string GetDownloadUrl(string fileName, Boolean isServer = true)
|
||||
{
|
||||
var userAddress = isServer ? "&userAddress=" + HttpUtility.UrlEncode(HttpContext.Current.Request.UserHostAddress) : "";
|
||||
var userAddress = isServer ? "&userAddress=" + HttpUtility.UrlEncode(CurUserHostAddress(HttpContext.Current.Request.UserHostAddress)) : "";
|
||||
var downloadUrl = new UriBuilder(GetServerUrl(isServer))
|
||||
{
|
||||
Path =
|
||||
@ -343,7 +343,6 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=download"
|
||||
+ "&fileName=" + HttpUtility.UrlEncode(fileName)
|
||||
+ "&userAddress=" + HttpUtility.UrlEncode(CurUserHostAddress(HttpContext.Current.Request.UserHostAddress))
|
||||
+ userAddress
|
||||
};
|
||||
return downloadUrl.ToString();
|
||||
|
||||
@ -53,49 +53,49 @@
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="Antlr3.Runtime">
|
||||
<Reference Include="Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework">
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Infrastructure">
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.Formatting">
|
||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Helpers">
|
||||
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http">
|
||||
<Reference Include="System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.WebHost">
|
||||
<Reference Include="System.Web.Http.WebHost, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc">
|
||||
<Reference Include="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Optimization">
|
||||
<Reference Include="System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor">
|
||||
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages">
|
||||
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Deployment">
|
||||
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor">
|
||||
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WebGrease">
|
||||
<Reference Include="WebGrease, Version=1.6.5135.21930, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
@ -185,10 +185,12 @@
|
||||
<Content Include="assets\AUTHORS.md" />
|
||||
<Content Include="assets\LICENSE" />
|
||||
<Content Include="assets\new\new.docx" />
|
||||
<Content Include="assets\new\new.docxf" />
|
||||
<Content Include="assets\new\new.pptx" />
|
||||
<Content Include="assets\new\new.xlsx" />
|
||||
<Content Include="assets\sample\csv.csv" />
|
||||
<Content Include="assets\sample\sample.docx" />
|
||||
<Content Include="assets\sample\sample.docxf" />
|
||||
<Content Include="assets\sample\sample.pptx" />
|
||||
<Content Include="assets\sample\sample.xlsx" />
|
||||
<None Include="packages.config" />
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
For more information on how to configure your ASP.NET application, please visit
|
||||
http://go.microsoft.com/fwlink/?LinkId=152368
|
||||
@ -26,11 +26,11 @@
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
<httpProtocol>
|
||||
<customHeaders>
|
||||
<add name="Access-Control-Allow-Origin" value="*" />
|
||||
</customHeaders>
|
||||
</httpProtocol>
|
||||
<httpProtocol>
|
||||
<customHeaders>
|
||||
<add name="Access-Control-Allow-Origin" value="*" />
|
||||
</customHeaders>
|
||||
</httpProtocol>
|
||||
<handlers>
|
||||
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
|
||||
<remove name="OPTIONSVerbHandler" />
|
||||
@ -46,13 +46,21 @@
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
|
||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||
@ -63,7 +71,4 @@
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
|
||||
</entityFramework>
|
||||
</configuration>
|
||||
@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Antlr" version="3.5.0.2" targetFramework="net45" />
|
||||
<package id="EntityFramework" version="6.4.4" targetFramework="net45" />
|
||||
<package id="Antlr" version="3.5.0.2" targetFramework="net48" />
|
||||
<package id="EntityFramework" version="6.4.4" targetFramework="net48" />
|
||||
<package id="JWT" version="9.0.3" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.7" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.7" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net45" />
|
||||
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net45" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net45" />
|
||||
<package id="WebGrease" version="1.6.0" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
||||
<package id="WebGrease" version="1.6.0" targetFramework="net48" />
|
||||
</packages>
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<appSettings>
|
||||
<clear />
|
||||
<add key="version" value="1.3.0"/>
|
||||
<add key="version" value="1.4.0"/>
|
||||
|
||||
<add key="filesize-max" value="52428800"/>
|
||||
<add key="storage-path" value=""/>
|
||||
|
||||
@ -23,6 +23,8 @@
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<TargetFrameworkProfile />
|
||||
<Use64BitIISExpress />
|
||||
<UseGlobalApplicationHostFile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -48,29 +50,29 @@
|
||||
<HintPath>packages\JWT.9.0.3\lib\net46\JWT.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure">
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Helpers">
|
||||
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor">
|
||||
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.Web.WebPages">
|
||||
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Deployment">
|
||||
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor">
|
||||
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
@ -159,10 +161,12 @@
|
||||
<Content Include="assets\AUTHORS.md" />
|
||||
<Content Include="assets\LICENSE" />
|
||||
<Content Include="assets\new\new.docx" />
|
||||
<Content Include="assets\new\new.docxf" />
|
||||
<Content Include="assets\new\new.pptx" />
|
||||
<Content Include="assets\new\new.xlsx" />
|
||||
<Content Include="assets\sample\csv.csv" />
|
||||
<Content Include="assets\sample\sample.docx" />
|
||||
<Content Include="assets\sample\sample.docxf" />
|
||||
<Content Include="assets\sample\sample.pptx" />
|
||||
<Content Include="assets\sample\sample.xlsx" />
|
||||
<None Include="packages.config" />
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<appSettings configSource="settings.config" />
|
||||
<system.web>
|
||||
@ -9,9 +9,9 @@
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<httpProtocol>
|
||||
<customHeaders>
|
||||
<add name="Access-Control-Allow-Origin" value="*" />
|
||||
</customHeaders>
|
||||
<customHeaders>
|
||||
<add name="Access-Control-Allow-Origin" value="*" />
|
||||
</customHeaders>
|
||||
</httpProtocol>
|
||||
<security>
|
||||
<requestFiltering>
|
||||
@ -25,4 +25,20 @@
|
||||
</requestFiltering>
|
||||
</security>
|
||||
</system.webServer>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="JWT" version="9.0.3" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net45" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
||||
</packages>
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<appSettings>
|
||||
<clear />
|
||||
<add key="version" value="1.3.0"/>
|
||||
<add key="version" value="1.4.0"/>
|
||||
|
||||
<add key="filesize-max" value="52428800"/>
|
||||
<add key="storage-path" value=""/>
|
||||
|
||||
@ -76,7 +76,7 @@ public class IndexController {
|
||||
List<Boolean> isFillFormDoc = new ArrayList<>();
|
||||
List<String> langsAndKeys = Arrays.asList(langs.split("\\|"));
|
||||
|
||||
Map<String, String> languages = new HashMap<>();
|
||||
Map<String, String> languages = new LinkedHashMap<>();
|
||||
|
||||
langsAndKeys.forEach((str) -> {
|
||||
String[] couple = str.split(":");
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
server.version=1.3.0
|
||||
server.version=1.4.0
|
||||
|
||||
server.address=
|
||||
server.port=4000
|
||||
|
||||
@ -72,6 +72,7 @@ header img {
|
||||
}
|
||||
|
||||
.main{
|
||||
display: table;
|
||||
height: calc(100% - 112px);
|
||||
min-height: 536px;
|
||||
}
|
||||
|
||||
@ -577,7 +577,7 @@ public class DocumentManager
|
||||
String langs = ConfigManager.GetProperty("files.docservice.languages");
|
||||
List<String> langsAndKeys = Arrays.asList(langs.split("\\|"));
|
||||
|
||||
Map<String, String> languages = new HashMap<>();
|
||||
Map<String, String> languages = new LinkedHashMap<>();
|
||||
|
||||
langsAndKeys.forEach((str) -> {
|
||||
String[] couple = str.split(":");
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
version=1.3.0
|
||||
version=1.4.0
|
||||
|
||||
filesize-max=5242880
|
||||
storage-folder=app_data
|
||||
|
||||
@ -44,6 +44,7 @@ const cfgSignatureAuthorizationHeaderPrefix = configServer.get('token.authorizat
|
||||
const cfgSignatureSecretExpiresIn = configServer.get('token.expiresIn');
|
||||
const cfgSignatureSecret = configServer.get('token.secret');
|
||||
const urllib = require("urllib");
|
||||
const { emitWarning } = require("process");
|
||||
const verifyPeerOff = configServer.get('verify_peer_off');
|
||||
|
||||
if(verifyPeerOff) {
|
||||
@ -347,7 +348,7 @@ app.post("/convert", function (req, res) { // define a handler for converting f
|
||||
response.end();
|
||||
};
|
||||
|
||||
var callback = function (err, data) {
|
||||
var callback = async function (err, res) {
|
||||
if (err) { // if an error occurs
|
||||
if (err.name === "ConnectionTimeoutError" || err.name === "ResponseTimeoutError") { // check what type of error it is
|
||||
writeResult(fileName, 0, null); // despite the timeout errors, write the file to the result object
|
||||
@ -358,7 +359,7 @@ app.post("/convert", function (req, res) { // define a handler for converting f
|
||||
}
|
||||
|
||||
try {
|
||||
var responseUri = documentService.getResponseUri(data.toString());
|
||||
var responseUri = documentService.getResponseUri(res.toString());
|
||||
var result = responseUri.key;
|
||||
var newFileUri = responseUri.value; // get the callback url
|
||||
|
||||
@ -369,10 +370,11 @@ app.post("/convert", function (req, res) { // define a handler for converting f
|
||||
|
||||
var correctName = req.docManager.getCorrectName(fileUtility.getFileName(fileName, true) + internalFileExt); // get the file name with a new extension
|
||||
|
||||
urllib.request(newFileUri, {method: "GET"},function(err, data) {
|
||||
fileSystem.writeFileSync(req.docManager.storagePath(correctName), data); // write a file with a new extension, but with the content from the origin file
|
||||
});
|
||||
const {status, data} = await urllib.request(newFileUri, {method: "GET"});
|
||||
|
||||
if (status != 200) throw new Error("Conversion service returned status: " + status);
|
||||
|
||||
fileSystem.writeFileSync(req.docManager.storagePath(correctName), data); // write a file with a new extension, but with the content from the origin file
|
||||
fileSystem.unlinkSync(req.docManager.storagePath(fileName)); // remove file with the origin extension
|
||||
|
||||
var userAddress = req.docManager.curUserHostAddress();
|
||||
@ -467,7 +469,7 @@ app.get("/csv", function (req, res) { // define a handler for downloading csv f
|
||||
filestream.pipe(res); // send file information to the response by streams
|
||||
})
|
||||
|
||||
app.post("/track", function (req, res) { // define a handler for tracking file changes
|
||||
app.post("/track", async function (req, res) { // define a handler for tracking file changes
|
||||
|
||||
req.docManager = new docManager(req, res);
|
||||
|
||||
@ -476,11 +478,15 @@ app.post("/track", function (req, res) { // define a handler for tracking file
|
||||
var version = 0;
|
||||
|
||||
// track file changes
|
||||
var processTrack = function (response, body, fileName, userAddress) {
|
||||
var processTrack = async function (response, body, fileName, userAddress) {
|
||||
|
||||
// callback file saving process
|
||||
var callbackProcessSave = function (downloadUri, body, fileName, userAddress, newFileName) {
|
||||
var callbackProcessSave = async function (downloadUri, body, fileName, userAddress, newFileName) {
|
||||
try {
|
||||
const {status, data} = await urllib.request(downloadUri, {method: "GET"});
|
||||
|
||||
if (status != 200) throw new Error("Document editing service returned status: " + status);
|
||||
|
||||
var storagePath = req.docManager.storagePath(newFileName, userAddress);
|
||||
|
||||
var historyPath = req.docManager.historyPath(newFileName, userAddress); // get the path to the history data
|
||||
@ -497,9 +503,12 @@ app.post("/track", function (req, res) { // define a handler for tracking file
|
||||
var downloadZip = body.changesurl;
|
||||
if (downloadZip) {
|
||||
var path_changes = req.docManager.diffPath(newFileName, userAddress, version); // get the path to the file with document versions differences
|
||||
urllib.request(downloadZip, {method: "GET"},function(err, data) {
|
||||
const {status, data} = await urllib.request(downloadZip, {method: "GET"});
|
||||
if (status == 200) {
|
||||
fileSystem.writeFileSync(path_changes, data); // write the document version differences to the archive
|
||||
});
|
||||
} else {
|
||||
emitWarning("Document editing service returned status: " + status);
|
||||
}
|
||||
}
|
||||
|
||||
var changeshistory = body.changeshistory || JSON.stringify(body.history);
|
||||
@ -514,9 +523,7 @@ app.post("/track", function (req, res) { // define a handler for tracking file
|
||||
var path_prev = path.join(versionPath, "prev" + fileUtility.getFileExtension(fileName)); // get the path to the previous file version
|
||||
fileSystem.renameSync(req.docManager.storagePath(fileName, userAddress), path_prev); // and write it to the current path
|
||||
|
||||
urllib.request(downloadUri, {method: "GET"},function(err, data) {
|
||||
fileSystem.writeFileSync(storagePath, data);
|
||||
});
|
||||
fileSystem.writeFileSync(storagePath, data);
|
||||
|
||||
var forcesavePath = req.docManager.forcesavePath(newFileName, userAddress, false); // get the path to the forcesaved file
|
||||
if (forcesavePath != "") { // if this path is empty
|
||||
@ -524,6 +531,7 @@ app.post("/track", function (req, res) { // define a handler for tracking file
|
||||
}
|
||||
|
||||
} catch (ex) {
|
||||
console.log(ex);
|
||||
response.write("{\"error\":1}");
|
||||
response.end();
|
||||
return;
|
||||
@ -534,7 +542,7 @@ app.post("/track", function (req, res) { // define a handler for tracking file
|
||||
}
|
||||
|
||||
// file saving process
|
||||
var processSave = function (downloadUri, body, fileName, userAddress) {
|
||||
var processSave = async function (downloadUri, body, fileName, userAddress) {
|
||||
|
||||
if (!downloadUri) {
|
||||
response.write("{\"error\":1}");
|
||||
@ -555,18 +563,18 @@ app.post("/track", function (req, res) { // define a handler for tracking file
|
||||
var key = documentService.generateRevisionId(downloadUri);
|
||||
newFileName = req.docManager.getCorrectName(fileUtility.getFileName(fileName, true) + downloadExt, userAddress); // get the correct file name if it already exists
|
||||
try {
|
||||
documentService.getConvertedUriSync(downloadUri, downloadExt, curExt, key, function (err, data) {
|
||||
documentService.getConvertedUriSync(downloadUri, downloadExt, curExt, key, async function (err, data) {
|
||||
if (err) {
|
||||
callbackProcessSave(downloadUri, body, fileName, userAddress, newFileName);
|
||||
await callbackProcessSave(downloadUri, body, fileName, userAddress, newFileName);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
var res = documentService.getResponseUri(data);
|
||||
callbackProcessSave(res.value, body, fileName, userAddress, fileName);
|
||||
await callbackProcessSave(res.value, body, fileName, userAddress, fileName);
|
||||
return;
|
||||
} catch (ex) {
|
||||
console.log(ex);
|
||||
callbackProcessSave(downloadUri, body, fileName, userAddress, newFileName);
|
||||
await callbackProcessSave(downloadUri, body, fileName, userAddress, newFileName);
|
||||
return;
|
||||
}
|
||||
});
|
||||
@ -575,12 +583,16 @@ app.post("/track", function (req, res) { // define a handler for tracking file
|
||||
console.log(ex);
|
||||
}
|
||||
}
|
||||
callbackProcessSave(downloadUri, body, fileName, userAddress, newFileName);
|
||||
await callbackProcessSave(downloadUri, body, fileName, userAddress, newFileName);
|
||||
};
|
||||
|
||||
// callback file force saving process
|
||||
var callbackProcessForceSave = function (downloadUri, body, fileName, userAddress, newFileName = false){
|
||||
var callbackProcessForceSave = async function (downloadUri, body, fileName, userAddress, newFileName = false){
|
||||
try {
|
||||
const {status, data} = await urllib.request(downloadUri, {method: "GET"});
|
||||
|
||||
if (status != 200) throw new Error("Document editing service returned status: " + status);
|
||||
|
||||
var downloadExt = "." + body.fileType;
|
||||
|
||||
/// TODO [Delete in version 7.0 or higher]
|
||||
@ -608,9 +620,7 @@ app.post("/track", function (req, res) { // define a handler for tracking file
|
||||
}
|
||||
}
|
||||
|
||||
urllib.request(downloadUri, {method: "GET"},function(err, data) {
|
||||
fileSystem.writeFileSync(forcesavePath, data);
|
||||
});
|
||||
fileSystem.writeFileSync(forcesavePath, data);
|
||||
|
||||
if (isSubmitForm) {
|
||||
var uid =body.actions[0].userid
|
||||
@ -627,7 +637,7 @@ app.post("/track", function (req, res) { // define a handler for tracking file
|
||||
}
|
||||
|
||||
// file force saving process
|
||||
var processForceSave = function (downloadUri, body, fileName, userAddress) {
|
||||
var processForceSave = async function (downloadUri, body, fileName, userAddress) {
|
||||
|
||||
if (!downloadUri) {
|
||||
response.write("{\"error\":1}");
|
||||
@ -645,18 +655,18 @@ app.post("/track", function (req, res) { // define a handler for tracking file
|
||||
if (downloadExt != curExt) {
|
||||
var key = documentService.generateRevisionId(downloadUri);
|
||||
try {
|
||||
documentService.getConvertedUriSync(downloadUri, downloadExt, curExt, key, function (err, data) {
|
||||
documentService.getConvertedUriSync(downloadUri, downloadExt, curExt, key, async function (err, data) {
|
||||
if (err) {
|
||||
callbackProcessForceSave(downloadUri, body, fileName, userAddress, true);
|
||||
await callbackProcessForceSave(downloadUri, body, fileName, userAddress, true);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
var res = documentService.getResponseUri(data);
|
||||
callbackProcessForceSave(res.value, body, fileName, userAddress, false);
|
||||
await callbackProcessForceSave(res.value, body, fileName, userAddress, false);
|
||||
return;
|
||||
} catch (ex) {
|
||||
console.log(ex);
|
||||
callbackProcessForceSave(downloadUri, body, fileName, userAddress, true);
|
||||
await callbackProcessForceSave(downloadUri, body, fileName, userAddress, true);
|
||||
return;
|
||||
}
|
||||
});
|
||||
@ -665,7 +675,7 @@ app.post("/track", function (req, res) { // define a handler for tracking file
|
||||
console.log(ex);
|
||||
}
|
||||
}
|
||||
callbackProcessForceSave (downloadUri, body, fileName, userAddress, false);
|
||||
await callbackProcessForceSave (downloadUri, body, fileName, userAddress, false);
|
||||
};
|
||||
|
||||
if (body.status == 1) { // editing
|
||||
@ -681,10 +691,10 @@ app.post("/track", function (req, res) { // define a handler for tracking file
|
||||
}
|
||||
}
|
||||
} else if (body.status == 2 || body.status == 3) { // MustSave, Corrupted
|
||||
processSave(body.url, body, fileName, userAddress); // save file
|
||||
await processSave(body.url, body, fileName, userAddress); // save file
|
||||
return;
|
||||
} else if (body.status == 6 || body.status == 7) { // MustForceSave, CorruptedForceSave
|
||||
processForceSave(body.url, body, fileName, userAddress); // force save file
|
||||
await processForceSave(body.url, body, fileName, userAddress); // force save file
|
||||
return;
|
||||
}
|
||||
|
||||
@ -693,14 +703,14 @@ app.post("/track", function (req, res) { // define a handler for tracking file
|
||||
};
|
||||
|
||||
// read request body
|
||||
var readbody = function (request, response, fileName, userAddress) {
|
||||
var readbody = async function (request, response, fileName, userAddress) {
|
||||
var content = "";
|
||||
request.on('data', function (data) { // get data from the request
|
||||
request.on('data', async function (data) { // get data from the request
|
||||
content += data;
|
||||
});
|
||||
request.on('end', function () {
|
||||
request.on('end', async function () {
|
||||
var body = JSON.parse(content);
|
||||
processTrack(response, body, fileName, userAddress); // and track file changes
|
||||
await processTrack(response, body, fileName, userAddress); // and track file changes
|
||||
});
|
||||
};
|
||||
|
||||
@ -732,14 +742,14 @@ app.post("/track", function (req, res) { // define a handler for tracking file
|
||||
res.end();
|
||||
return;
|
||||
}
|
||||
processTrack(res, body, fileName, userAddress);
|
||||
await processTrack(res, body, fileName, userAddress);
|
||||
return;
|
||||
}
|
||||
|
||||
if (req.body.hasOwnProperty("status")) { // if the request body has status parameter
|
||||
processTrack(res, req.body, fileName, userAddress); // track file changes
|
||||
await processTrack(res, req.body, fileName, userAddress); // track file changes
|
||||
} else {
|
||||
readbody(req, res, fileName, userAddress); // otherwise, read request body first
|
||||
await readbody(req, res, fileName, userAddress); // otherwise, read request body first
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.3.0",
|
||||
"version": "1.4.0",
|
||||
"log": {
|
||||
"appenders": [
|
||||
{
|
||||
|
||||
@ -1,54 +1,36 @@
|
||||
"width": "100%",
|
||||
"height": "100%",
|
||||
"type": "<%- editor.type %>",
|
||||
"documentType": "<%- editor.documentType %>",
|
||||
"token": "<%- editor.token %>",
|
||||
"document": {
|
||||
"title": "<%- file.name %>",
|
||||
"url": "<%- file.uri %>",
|
||||
"document": {
|
||||
"directUrl": "<%- file.directUrl %>",
|
||||
"fileType": "<%- file.ext %>",
|
||||
"key": "<%- editor.key %>",
|
||||
"info": {
|
||||
"owner": "Me",
|
||||
"uploaded": "<%- file.created %>",
|
||||
"favorite": <%- file.favorite %>
|
||||
},
|
||||
"key": "<%- editor.key %>",
|
||||
"permissions": {
|
||||
"chat": <%- editor.chat %>,
|
||||
"comment": <%- editor.comment %>,
|
||||
"copy": <%- editor.copy %>,
|
||||
"download": <%- editor.download %>,
|
||||
"edit": <%- editor.isEdit %>,
|
||||
"print": <%- editor.print %>,
|
||||
"fillForms": <%- editor.fillForms %>,
|
||||
"modifyFilter": <%- editor.modifyFilter %>,
|
||||
"modifyContentControl": <%- editor.modifyContentControl %>,
|
||||
"modifyFilter": <%- editor.modifyFilter %>,
|
||||
"print": <%- editor.print %>,
|
||||
"review": <%- editor.review %>,
|
||||
"reviewGroups": <%- editor.reviewGroups %>,
|
||||
"commentGroups": <%- editor.commentGroups %>,
|
||||
"userInfoGroups": <%- editor.userInfoGroups %>
|
||||
}
|
||||
},
|
||||
"title": "<%- file.name %>",
|
||||
"url": "<%- file.uri %>"
|
||||
},
|
||||
"documentType": "<%- editor.documentType %>",
|
||||
"editorConfig": {
|
||||
"actionLink": <%- editor.actionData %>,
|
||||
"coEditing": <%- JSON.stringify(editor.coEditing) %>,
|
||||
"mode": "<%- editor.mode %>",
|
||||
"lang": "<%- editor.lang %>",
|
||||
"callbackUrl": "<%- editor.callbackUrl %>",
|
||||
"coEditing": <%- JSON.stringify(editor.coEditing) %>,
|
||||
"createUrl": <%- JSON.stringify(editor.createUrl) %>,
|
||||
"templates": <%- JSON.stringify(editor.templates) %>,
|
||||
"user": {
|
||||
"group": "<%- editor.userGroup %>",
|
||||
"id": "<%- editor.userid %>",
|
||||
"name": "<%- editor.name %>"
|
||||
},
|
||||
"embedded": {
|
||||
"saveUrl": "<%- file.uriUser %>",
|
||||
"embedUrl": "<%- file.uriUser %>",
|
||||
"shareUrl": "<%- file.uriUser %>",
|
||||
"toolbarDocked": "top"
|
||||
},
|
||||
"customization": {
|
||||
"about": true,
|
||||
"comments": true,
|
||||
@ -59,6 +41,24 @@
|
||||
},
|
||||
"submitForm": <%- editor.submitForm %>
|
||||
},
|
||||
"embedded": {
|
||||
"embedUrl": "<%- file.uriUser %>",
|
||||
"saveUrl": "<%- file.uriUser %>",
|
||||
"shareUrl": "<%- file.uriUser %>",
|
||||
"toolbarDocked": "top"
|
||||
},
|
||||
"fileChoiceUrl": "<%- editor.fileChoiceUrl %>",
|
||||
"plugins": <%- editor.plugins %>
|
||||
}
|
||||
"lang": "<%- editor.lang %>",
|
||||
"mode": "<%- editor.mode %>",
|
||||
"plugins": <%- editor.plugins %>,
|
||||
"templates": <%- JSON.stringify(editor.templates) %>,
|
||||
"user": {
|
||||
"group": "<%- editor.userGroup %>",
|
||||
"id": "<%- editor.userid %>",
|
||||
"name": "<%- editor.name %>"
|
||||
}
|
||||
},
|
||||
"height": "100%",
|
||||
"token": "<%- editor.token %>",
|
||||
"type": "<%- editor.type %>",
|
||||
"width": "100%"
|
||||
|
||||
@ -186,20 +186,21 @@
|
||||
}
|
||||
};
|
||||
|
||||
config = {<%- include("config") %>,
|
||||
events: {
|
||||
"onAppReady": onAppReady,
|
||||
"onDocumentStateChange": onDocumentStateChange,
|
||||
"onRequestEditRights": onRequestEditRights,
|
||||
"onError": onError,
|
||||
"onOutdatedVersion": onOutdatedVersion,
|
||||
"onMakeActionLink": onMakeActionLink,
|
||||
"onMetaChange": onMetaChange,
|
||||
"onRequestInsertImage": onRequestInsertImage,
|
||||
"onRequestCompareFile": onRequestCompareFile,
|
||||
"onRequestMailMergeRecipients": onRequestMailMergeRecipients,
|
||||
}
|
||||
};
|
||||
config = {
|
||||
<%- include("config") %>
|
||||
};
|
||||
config.events = {
|
||||
"onAppReady": onAppReady,
|
||||
"onDocumentStateChange": onDocumentStateChange,
|
||||
"onRequestEditRights": onRequestEditRights,
|
||||
"onError": onError,
|
||||
"onOutdatedVersion": onOutdatedVersion,
|
||||
"onMakeActionLink": onMakeActionLink,
|
||||
"onMetaChange": onMetaChange,
|
||||
"onRequestInsertImage": onRequestInsertImage,
|
||||
"onRequestCompareFile": onRequestCompareFile,
|
||||
"onRequestMailMergeRecipients": onRequestMailMergeRecipients,
|
||||
};
|
||||
|
||||
if (<%- JSON.stringify(editor.userid) %> != null) {
|
||||
config.events.onRequestHistory = onRequestHistory;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$GLOBALS['version'] = "1.3.0";
|
||||
$GLOBALS['version'] = "1.4.0";
|
||||
|
||||
$GLOBALS['FILE_SIZE_MAX'] = 5242880;
|
||||
$GLOBALS['STORAGE_PATH'] = "";
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import os
|
||||
|
||||
VERSION = '1.3.0'
|
||||
VERSION = '1.4.0'
|
||||
|
||||
FILE_SIZE_MAX = 5242880
|
||||
STORAGE_PATH = 'app_data'
|
||||
|
||||
@ -2,7 +2,7 @@ source 'https://rubygems.org'
|
||||
|
||||
gem 'mimemagic', github: 'mimemagicrb/mimemagic', ref: '01f92d86d15d85cfd0f20dabd025dcbd36a8a60f'
|
||||
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
||||
gem 'rails', '6.1.4.1'
|
||||
gem 'rails', '7.0.3.1'
|
||||
# Use sqlite3 as the database for Active Record
|
||||
gem 'sqlite3', '1.4.2'
|
||||
# Use SCSS for stylesheets
|
||||
@ -19,9 +19,11 @@ gem 'jquery-rails'
|
||||
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
||||
gem 'turbolinks'
|
||||
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
||||
gem 'jbuilder', '~> 2.9.1'
|
||||
gem 'jbuilder', '~> 2.11.5'
|
||||
# bundle exec rake doc:rails generates the API under doc/api.
|
||||
gem 'sdoc', '~> 0.4.0', group: :doc
|
||||
gem 'sdoc', '~> 2.4.0', group: :doc
|
||||
|
||||
gem "tzinfo-data"
|
||||
|
||||
# Use ActiveModel has_secure_password
|
||||
# gem 'bcrypt', '~> 3.1.7'
|
||||
@ -37,12 +39,9 @@ group :development, :test do
|
||||
gem 'byebug'
|
||||
|
||||
# Access an IRB console on exception pages or by using <%= console %> in views
|
||||
gem 'web-console', '~> 2.0'
|
||||
gem 'web-console', '~> 4.2.0'
|
||||
end
|
||||
|
||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
||||
|
||||
gem 'uuid'
|
||||
|
||||
gem 'rack-cors'
|
||||
|
||||
@ -8,67 +8,72 @@ GIT
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
actioncable (6.1.4.1)
|
||||
actionpack (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
actioncable (7.0.3.1)
|
||||
actionpack (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
nio4r (~> 2.0)
|
||||
websocket-driver (>= 0.6.1)
|
||||
actionmailbox (6.1.4.1)
|
||||
actionpack (= 6.1.4.1)
|
||||
activejob (= 6.1.4.1)
|
||||
activerecord (= 6.1.4.1)
|
||||
activestorage (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
actionmailbox (7.0.3.1)
|
||||
actionpack (= 7.0.3.1)
|
||||
activejob (= 7.0.3.1)
|
||||
activerecord (= 7.0.3.1)
|
||||
activestorage (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
mail (>= 2.7.1)
|
||||
actionmailer (6.1.4.1)
|
||||
actionpack (= 6.1.4.1)
|
||||
actionview (= 6.1.4.1)
|
||||
activejob (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
net-imap
|
||||
net-pop
|
||||
net-smtp
|
||||
actionmailer (7.0.3.1)
|
||||
actionpack (= 7.0.3.1)
|
||||
actionview (= 7.0.3.1)
|
||||
activejob (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
net-imap
|
||||
net-pop
|
||||
net-smtp
|
||||
rails-dom-testing (~> 2.0)
|
||||
actionpack (6.1.4.1)
|
||||
actionview (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
rack (~> 2.0, >= 2.0.9)
|
||||
actionpack (7.0.3.1)
|
||||
actionview (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
rack (~> 2.0, >= 2.2.0)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||
actiontext (6.1.4.1)
|
||||
actionpack (= 6.1.4.1)
|
||||
activerecord (= 6.1.4.1)
|
||||
activestorage (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
actiontext (7.0.3.1)
|
||||
actionpack (= 7.0.3.1)
|
||||
activerecord (= 7.0.3.1)
|
||||
activestorage (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
globalid (>= 0.6.0)
|
||||
nokogiri (>= 1.8.5)
|
||||
actionview (6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
actionview (7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
builder (~> 3.1)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||
activejob (6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
activejob (7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
globalid (>= 0.3.6)
|
||||
activemodel (6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
activerecord (6.1.4.1)
|
||||
activemodel (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
activestorage (6.1.4.1)
|
||||
actionpack (= 6.1.4.1)
|
||||
activejob (= 6.1.4.1)
|
||||
activerecord (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
marcel (~> 1.0.0)
|
||||
activemodel (7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
activerecord (7.0.3.1)
|
||||
activemodel (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
activestorage (7.0.3.1)
|
||||
actionpack (= 7.0.3.1)
|
||||
activejob (= 7.0.3.1)
|
||||
activerecord (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
marcel (~> 1.0)
|
||||
mini_mime (>= 1.1.0)
|
||||
activesupport (6.1.4.1)
|
||||
activesupport (7.0.3.1)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 1.6, < 2)
|
||||
minitest (>= 5.1)
|
||||
tzinfo (~> 2.0)
|
||||
zeitwerk (~> 2.3)
|
||||
binding_of_caller (1.0.0)
|
||||
debug_inspector (>= 0.0.1)
|
||||
bindex (0.8.1)
|
||||
builder (3.2.4)
|
||||
byebug (11.1.3)
|
||||
coffee-rails (5.0.0)
|
||||
@ -80,24 +85,23 @@ GEM
|
||||
coffee-script-source (1.12.2)
|
||||
concurrent-ruby (1.1.10)
|
||||
crass (1.0.6)
|
||||
debug_inspector (1.1.0)
|
||||
erubi (1.10.0)
|
||||
digest (3.1.0)
|
||||
erubi (1.11.0)
|
||||
execjs (2.8.1)
|
||||
ffi (1.15.5)
|
||||
ffi (1.15.5-x64-mingw32)
|
||||
ffi (1.15.5-x64-mingw-ucrt)
|
||||
globalid (1.0.0)
|
||||
activesupport (>= 5.0)
|
||||
i18n (1.12.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jbuilder (2.9.1)
|
||||
activesupport (>= 4.2.0)
|
||||
jbuilder (2.11.5)
|
||||
actionview (>= 5.0.0)
|
||||
activesupport (>= 5.0.0)
|
||||
jquery-rails (4.5.0)
|
||||
rails-dom-testing (>= 1, < 3)
|
||||
railties (>= 4.2.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
json (1.8.6)
|
||||
jwt (2.4.1)
|
||||
loofah (2.18.0)
|
||||
loofah (2.19.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
macaddr (1.7.2)
|
||||
@ -107,61 +111,73 @@ GEM
|
||||
marcel (1.0.2)
|
||||
method_source (1.0.0)
|
||||
mini_mime (1.1.2)
|
||||
minitest (5.16.2)
|
||||
minitest (5.16.3)
|
||||
net-imap (0.2.3)
|
||||
digest
|
||||
net-protocol
|
||||
strscan
|
||||
net-pop (0.1.1)
|
||||
digest
|
||||
net-protocol
|
||||
timeout
|
||||
net-protocol (0.1.3)
|
||||
timeout
|
||||
net-smtp (0.3.1)
|
||||
digest
|
||||
net-protocol
|
||||
timeout
|
||||
nio4r (2.5.8)
|
||||
nokogiri (1.13.8-x64-mingw32)
|
||||
racc (~> 1.4)
|
||||
nokogiri (1.13.8-x86_64-linux)
|
||||
nokogiri (1.13.8-x64-mingw-ucrt)
|
||||
racc (~> 1.4)
|
||||
psych (4.0.5)
|
||||
stringio
|
||||
racc (1.6.0)
|
||||
rack (2.2.4)
|
||||
rack-cors (1.1.1)
|
||||
rack (>= 2.0.0)
|
||||
rack-test (2.0.2)
|
||||
rack (>= 1.3)
|
||||
rails (6.1.4.1)
|
||||
actioncable (= 6.1.4.1)
|
||||
actionmailbox (= 6.1.4.1)
|
||||
actionmailer (= 6.1.4.1)
|
||||
actionpack (= 6.1.4.1)
|
||||
actiontext (= 6.1.4.1)
|
||||
actionview (= 6.1.4.1)
|
||||
activejob (= 6.1.4.1)
|
||||
activemodel (= 6.1.4.1)
|
||||
activerecord (= 6.1.4.1)
|
||||
activestorage (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
rails (7.0.3.1)
|
||||
actioncable (= 7.0.3.1)
|
||||
actionmailbox (= 7.0.3.1)
|
||||
actionmailer (= 7.0.3.1)
|
||||
actionpack (= 7.0.3.1)
|
||||
actiontext (= 7.0.3.1)
|
||||
actionview (= 7.0.3.1)
|
||||
activejob (= 7.0.3.1)
|
||||
activemodel (= 7.0.3.1)
|
||||
activerecord (= 7.0.3.1)
|
||||
activestorage (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
bundler (>= 1.15.0)
|
||||
railties (= 6.1.4.1)
|
||||
sprockets-rails (>= 2.0.0)
|
||||
railties (= 7.0.3.1)
|
||||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.4.3)
|
||||
loofah (~> 2.3)
|
||||
railties (6.1.4.1)
|
||||
actionpack (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
railties (7.0.3.1)
|
||||
actionpack (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
method_source
|
||||
rake (>= 0.13)
|
||||
rake (>= 12.2)
|
||||
thor (~> 1.0)
|
||||
zeitwerk (~> 2.5)
|
||||
rake (13.0.6)
|
||||
rdoc (4.3.0)
|
||||
rdoc (6.4.0)
|
||||
psych (>= 4.0.0)
|
||||
sass-rails (6.0.0)
|
||||
sassc-rails (~> 2.1, >= 2.1.1)
|
||||
sassc (2.4.0)
|
||||
ffi (~> 1.9)
|
||||
sassc (2.4.0-x64-mingw32)
|
||||
ffi (~> 1.9)
|
||||
sassc-rails (2.1.2)
|
||||
railties (>= 4.0.0)
|
||||
sassc (>= 2.0)
|
||||
sprockets (> 3.0)
|
||||
sprockets-rails
|
||||
tilt
|
||||
sdoc (0.4.2)
|
||||
json (~> 1.7, >= 1.7.7)
|
||||
rdoc (~> 4.0)
|
||||
sdoc (2.4.0)
|
||||
rdoc (>= 5.0)
|
||||
sprockets (4.1.1)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (> 1, < 3)
|
||||
@ -170,25 +186,28 @@ GEM
|
||||
activesupport (>= 5.2)
|
||||
sprockets (>= 3.0.0)
|
||||
sqlite3 (1.4.2)
|
||||
stringio (3.0.2)
|
||||
strscan (3.0.4)
|
||||
systemu (2.6.5)
|
||||
thor (1.2.1)
|
||||
tilt (2.0.11)
|
||||
timeout (0.3.0)
|
||||
turbolinks (5.2.1)
|
||||
turbolinks-source (~> 5.2)
|
||||
turbolinks-source (5.2.0)
|
||||
tzinfo (2.0.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
tzinfo-data (1.2022.1)
|
||||
tzinfo-data (1.2022.4)
|
||||
tzinfo (>= 1.0.0)
|
||||
uglifier (4.2.0)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
uuid (2.3.9)
|
||||
macaddr (~> 1.0)
|
||||
web-console (2.3.0)
|
||||
activemodel (>= 4.0)
|
||||
binding_of_caller (>= 0.7.2)
|
||||
railties (>= 4.0)
|
||||
sprockets-rails (>= 2.0, < 4.0)
|
||||
web-console (4.2.0)
|
||||
actionview (>= 6.0.0)
|
||||
activemodel (>= 6.0.0)
|
||||
bindex (>= 0.4.0)
|
||||
railties (>= 6.0.0)
|
||||
webrick (1.7.0)
|
||||
websocket-driver (0.7.5)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
@ -196,27 +215,26 @@ GEM
|
||||
zeitwerk (2.6.0)
|
||||
|
||||
PLATFORMS
|
||||
x64-mingw32
|
||||
x86_64-linux
|
||||
x64-mingw-ucrt
|
||||
|
||||
DEPENDENCIES
|
||||
byebug
|
||||
coffee-rails (~> 5.0.0)
|
||||
jbuilder (~> 2.9.1)
|
||||
jbuilder (~> 2.11.5)
|
||||
jquery-rails
|
||||
jwt (~> 2.4.1)
|
||||
mimemagic!
|
||||
rack-cors
|
||||
rails (= 6.1.4.1)
|
||||
rails (= 7.0.3.1)
|
||||
sass-rails (~> 6.0)
|
||||
sdoc (~> 0.4.0)
|
||||
sdoc (~> 2.4.0)
|
||||
sqlite3 (= 1.4.2)
|
||||
turbolinks
|
||||
tzinfo-data
|
||||
uglifier (>= 4.2.0)
|
||||
uuid
|
||||
web-console (~> 2.0)
|
||||
web-console (~> 4.2.0)
|
||||
webrick
|
||||
|
||||
BUNDLED WITH
|
||||
2.2.22
|
||||
2.3.7
|
||||
|
||||
@ -177,7 +177,7 @@ class HomeController < ApplicationController
|
||||
# add headers to the response to specify the page parameters
|
||||
response.headers['Content-Length'] = File.size(file_path).to_s
|
||||
response.headers['Content-Type'] = MimeMagic.by_path(file_path).eql?(nil) ? nil : MimeMagic.by_path(file_path).type
|
||||
response.headers['Content-Disposition'] = "attachment;filename*=UTF-8\'\'" + URI.escape(file, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
|
||||
response.headers['Content-Disposition'] = "attachment;filename*=UTF-8\'\'" + ERB::Util.url_encode(file)
|
||||
|
||||
send_file file_path, :x_sendfile => true
|
||||
rescue => ex
|
||||
@ -262,7 +262,7 @@ class HomeController < ApplicationController
|
||||
# add headers to the response to specify the page parameters
|
||||
response.headers['Content-Length'] = File.size(csvPath).to_s
|
||||
response.headers['Content-Type'] = MimeMagic.by_path(csvPath).type
|
||||
response.headers['Content-Disposition'] = "attachment;filename*=UTF-8\'\'" + URI.escape(file_name, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
|
||||
response.headers['Content-Disposition'] = "attachment;filename*=UTF-8\'\'" + ERB::Util.url_encode(file_name)
|
||||
|
||||
send_file csvPath, :x_sendfile => true
|
||||
end
|
||||
@ -295,7 +295,7 @@ class HomeController < ApplicationController
|
||||
# add headers to the response to specify the page parameters
|
||||
response.headers['Content-Length'] = File.size(file_path).to_s
|
||||
response.headers['Content-Type'] = MimeMagic.by_path(file_path).eql?(nil) ? nil : MimeMagic.by_path(file_path).type
|
||||
response.headers['Content-Disposition'] = "attachment;filename*=UTF-8\'\'" + URI.escape(file_name, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
|
||||
response.headers['Content-Disposition'] = "attachment;filename*=UTF-8\'\'" + ERB::Util.url_encode(file_name)
|
||||
|
||||
send_file file_path, :x_sendfile => true
|
||||
rescue => ex
|
||||
|
||||
@ -230,7 +230,7 @@ class DocumentHelper
|
||||
|
||||
# get file url
|
||||
def get_file_uri(file_name, for_document_server)
|
||||
uri = get_server_url(for_document_server) + '/' + Rails.configuration.storagePath + '/' + cur_user_host_address(nil) + '/' + URI::encode(file_name)
|
||||
uri = get_server_url(for_document_server) + '/' + Rails.configuration.storagePath + '/' + cur_user_host_address(nil) + '/' + ERB::Util.url_encode(file_name)
|
||||
|
||||
return uri
|
||||
end
|
||||
@ -239,7 +239,7 @@ class DocumentHelper
|
||||
def get_historypath_uri(file_name,version,file,is_serverUrl=true)
|
||||
# for redirection to my link
|
||||
user_host = is_serverUrl ? '&userAddress=' + cur_user_host_address(nil) : ""
|
||||
uri = get_server_url(is_serverUrl) + '/downloadhistory/?fileName=' + URI::encode(file_name) + '&ver='+ version.to_s + '&file='+ URI::encode(file) + user_host
|
||||
uri = get_server_url(is_serverUrl) + '/downloadhistory/?fileName=' + ERB::Util.url_encode(file_name) + '&ver='+ version.to_s + '&file='+ ERB::Util.url_encode(file) + user_host
|
||||
return uri
|
||||
end
|
||||
|
||||
@ -255,7 +255,7 @@ class DocumentHelper
|
||||
# get callback url
|
||||
def get_callback(file_name)
|
||||
|
||||
get_server_url(true) + '/track?fileName=' + URI::encode(file_name) + '&userAddress=' + cur_user_host_address(nil)
|
||||
get_server_url(true) + '/track?fileName=' + ERB::Util.url_encode(file_name) + '&userAddress=' + cur_user_host_address(nil)
|
||||
|
||||
end
|
||||
|
||||
@ -270,7 +270,7 @@ class DocumentHelper
|
||||
def get_download_url(file_name, is_serverUrl=true)
|
||||
|
||||
user_host = is_serverUrl ? '&userAddress=' + cur_user_host_address(nil) : ""
|
||||
get_server_url(is_serverUrl) + '/download?fileName=' + URI::encode(file_name) + user_host
|
||||
get_server_url(is_serverUrl) + '/download?fileName=' + ERB::Util.url_encode(file_name) + user_host
|
||||
|
||||
end
|
||||
|
||||
|
||||
@ -128,7 +128,7 @@
|
||||
<%
|
||||
docs.each { |d|
|
||||
isFillFormDoc = DocumentHelper.fill_forms_exts.include?(File.extname(d).downcase)
|
||||
editUrl = "editor?fileName=#{URI::encode(d)}"
|
||||
editUrl = "editor?fileName=#{ERB::Util.url_encode(d)}"
|
||||
docType = FileUtility.get_file_type(d)
|
||||
canEdit = DocumentHelper.edited_exts.include?(File.extname(d).downcase) %>
|
||||
<tr class="tableRow" title="<%= d %> [<%= DocumentHelper.get_file_version(DocumentHelper.history_dir(DocumentHelper.storage_path(d, nil))) %>]">
|
||||
@ -221,7 +221,7 @@
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-shift contentCells-icon downloadContentCellShift">
|
||||
<a href="<%= "download?fileName=#{URI::encode(d)}" %>">
|
||||
<a href="<%= "download?fileName=#{ERB::Util.url_encode(d)}" %>">
|
||||
<img class="icon-download" src="assets/download.svg" alt="Download" title="Download" />
|
||||
</a>
|
||||
</td>
|
||||
|
||||
@ -26,7 +26,7 @@ module OnlineEditorsExampleRuby
|
||||
end
|
||||
end
|
||||
|
||||
Rails.configuration.version="1.3.0"
|
||||
Rails.configuration.version="1.4.0"
|
||||
|
||||
Rails.configuration.fileSizeMax=5242880
|
||||
Rails.configuration.storagePath="app_data"
|
||||
|
||||
Reference in New Issue
Block a user