mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
Merge pull request 'fix/storage-test3' (#40) from fix/storage-test3 into develop
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/server/pulls/40
This commit is contained in:
@ -141,12 +141,13 @@ async function deletePath(ctx, strPath, opt_specialDir) {
|
||||
let storageCfg = getStorageCfg(ctx, opt_specialDir);
|
||||
return await storage.deletePath(storageCfg, getStoragePath(ctx, strPath, opt_specialDir));
|
||||
}
|
||||
async function getSignedUrl(ctx, baseUrl, strPath, urlType, optFilename, opt_creationDate, opt_specialDir) {
|
||||
async function getSignedUrl(ctx, baseUrl, strPath, urlType, optFilename, opt_creationDate, opt_specialDir, useDirectStorageUrls) {
|
||||
let storage = getStorage(opt_specialDir);
|
||||
let storageCfg = getStorageCfg(ctx, opt_specialDir);
|
||||
let storagePath = getStoragePath(ctx, strPath, opt_specialDir);
|
||||
const directUrlsEnabled = useDirectStorageUrls ?? storageCfg.useDirectStorageUrls;
|
||||
|
||||
if (storageCfg.useDirectStorageUrls && storage.getDirectSignedUrl) {
|
||||
if (directUrlsEnabled && storage.getDirectSignedUrl) {
|
||||
return await storage.getDirectSignedUrl(ctx, storageCfg, baseUrl, storagePath, urlType, optFilename, opt_creationDate);
|
||||
} else {
|
||||
const storageSecretString = storageCfg.fs.secretString;
|
||||
|
||||
Reference in New Issue
Block a user