Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/develop' into feature/se…
Browse files Browse the repository at this point in the history
…lect-cell

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
LinneyS committed Oct 12, 2023
2 parents 5f19bdc + 64302b3 commit 73ef86e
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 8 deletions.
9 changes: 2 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# Change Log

- csharp-mvc: onRequestSelectSpreadsheet method
- csharp: onRequestSelectSpreadsheet method
- java-spring: onRequestSelectSpreadsheet method
- java: onRequestSelectSpreadsheet method
- ruby: onRequestSelectSpreadsheet method
- php: onRequestSelectSpreadsheet method
- python: onRequestSelectSpreadsheet method
- onRequestSelectSpreadsheet method
- key in referenceData
- nodejs: link in referenceData
- nodejs: onRequestSelectDocument method
- nodejs: onRequestSelectSpreadsheet method
Expand Down
1 change: 1 addition & 0 deletions web/documentserver-example/csharp-mvc/WebEditor.ashx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ private static void Reference(HttpContext context)

var data = new Dictionary<string, object>() {
{ "fileType", (Path.GetExtension(fileName) ?? "").ToLower().Trim('.') },
{ "key", ServiceConverter.GenerateRevisionId(DocManagerHelper.CurUserHostAddress() + "/" + fileName + "/" + File.GetLastWriteTime(DocManagerHelper.StoragePath(fileName, null)).GetHashCode())},
{ "url", DocManagerHelper.GetDownloadUrl(fileName)},
{ "directUrl", directUrl ? DocManagerHelper.GetDownloadUrl(fileName, false) : null },
{ "referenceData", new Dictionary<string, string>()
Expand Down
3 changes: 3 additions & 0 deletions web/documentserver-example/csharp/WebEditor.ashx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,9 @@ private static void Reference(HttpContext context)

var data = new Dictionary<string, object>() {
{ "fileType", (Path.GetExtension(fileName) ?? "").ToLower().Trim('.') },
{ "key", ServiceConverter.GenerateRevisionId(_Default.CurUserHostAddress(null)
+ "/" + Path.GetFileName(_Default.FileUri(fileName, true))
+ "/" + File.GetLastWriteTime(_Default.StoragePath(fileName, null)).GetHashCode()) },
{ "url", DocEditor.getDownloadUrl(fileName)},
{ "directUrl", directUrl ? DocEditor.getDownloadUrl(fileName, false) : null},
{ "referenceData", new Dictionary<string, string>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,11 @@ public String reference(@RequestBody final Reference body) {

HashMap<String, Object> data = new HashMap<>();
data.put("fileType", fileUtility.getFileExtension(fileName));
data.put("key", serviceConverter.generateRevisionId(
storagePathBuilder.getStorageLocation()
+ "/" + fileName + "/"
+ new File(storagePathBuilder.getFileLocation(fileName)).lastModified()
));
data.put("url", documentManager.getDownloadUrl(fileName, true));
data.put("directUrl", body.getDirectUrl() ? documentManager.getDownloadUrl(fileName, false) : null);
data.put("referenceData", referenceData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,10 @@ private static void reference(final HttpServletRequest request,

HashMap<String, Object> data = new HashMap<>();
data.put("fileType", FileUtility.getFileExtension(fileName));
data.put("key", ServiceConverter.generateRevisionId(DocumentManager
.curUserHostAddress(null) + "/" + fileName + "/"
+ Long.toString(new File(DocumentManager.storagePath(fileName, null))
.lastModified())));
data.put("url", DocumentManager.getDownloadUrl(fileName, true));
data.put("directUrl", directUrl ? DocumentManager.getDownloadUrl(fileName, false) : null);
data.put("referenceData", referenceData);
Expand Down
2 changes: 1 addition & 1 deletion web/documentserver-example/nodejs/helpers/docManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ DocManager.prototype.saveFileData = function saveFileData(fileName, userid, user
const minutes = (dateCreate.getMinutes() < 10 ? '0' : '') + dateCreate.getMinutes().toString();
const month = (dateCreate.getMonth() < 10 ? '0' : '') + (parseInt(dateCreate.getMonth().toString(), 10) + 1);
const sec = (dateCreate.getSeconds() < 10 ? '0' : '') + dateCreate.getSeconds().toString();
const dateFormat = `${dateCreate.getFullYear()}-${month}-${dateCreate.getDate()}`
const dateFormat = `${dateCreate.getFullYear()}-${month}-${dateCreate.getDate()} `
+ `${dateCreate.getHours()}:${minutes}:${sec}`;

const fileInfo = this.historyPath(fileName, address, true); // get file history information
Expand Down
1 change: 1 addition & 0 deletions web/documentserver-example/php/src/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ function reference()

$data = [
"fileType" => trim(getInternalExtension($fileName), '.'),
"key" => getDocEditorKey($fileName),
"url" => getDownloadUrl($fileName),
"directUrl" => $post["directUrl"] ? getDownloadUrl($fileName, false) : null,
"referenceData" => [
Expand Down
1 change: 1 addition & 0 deletions web/documentserver-example/python/src/views/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ def reference(request):

data = {
'fileType' : fileUtils.getFileExt(fileName).replace('.', ''),
'key': docManager.generateFileKey(fileName,request),
'url' : docManager.getDownloadUrl(fileName, request),
'directUrl' : docManager.getDownloadUrl(fileName, request, False) if body["directUrl"] else None,
'referenceData' : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ def reference

data = {
:fileType => File.extname(fileName).downcase.delete("."),
:key => ServiceConverter.generate_revision_id("#{DocumentHelper.cur_user_host_address(nil) + '/' + fileName}.#{File.mtime(DocumentHelper.storage_path(fileName, nil)).to_s}"),
:url => DocumentHelper.get_download_url(fileName),
:directUrl => body["directUrl"] ? DocumentHelper.get_download_url(fileName, false) : nil,
:referenceData => {
Expand Down

0 comments on commit 73ef86e

Please sign in to comment.