mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
[web] download binary files in clsi from filestore via new endpoints (#27505)
* [history-v1] use String.padStart instead of lodash.padStart * [web] download binary files in clsi from filestore via new endpoints * [server-ce] tests: Cypress.env() is parsing boolean values * [server-ce] tests: run history migration as root GitOrigin-RevId: bdf6c0e542531ccc4b3f13d2ed68ca0d31e580e9
This commit is contained in:
@@ -86,7 +86,7 @@ module.exports = class FSPersistor extends AbstractPersistor {
|
||||
metric: 'fs.ingress', // ingress to us from disk
|
||||
bucket: location,
|
||||
})
|
||||
const fsPath = this._getFsPath(location, name)
|
||||
const fsPath = this._getFsPath(location, name, opts.useSubdirectories)
|
||||
|
||||
try {
|
||||
opts.fd = await fsPromises.open(fsPath, 'r')
|
||||
@@ -295,9 +295,9 @@ module.exports = class FSPersistor extends AbstractPersistor {
|
||||
await fsPromises.rm(dirPath, { force: true, recursive: true })
|
||||
}
|
||||
|
||||
_getFsPath(location, key) {
|
||||
_getFsPath(location, key, useSubdirectories = false) {
|
||||
key = key.replace(/\/$/, '')
|
||||
if (!this.useSubdirectories) {
|
||||
if (!this.useSubdirectories && !useSubdirectories) {
|
||||
key = key.replace(/\//g, '_')
|
||||
}
|
||||
return Path.join(location, key)
|
||||
|
||||
Reference in New Issue
Block a user