Skip to content

Commit

Permalink
fix(mongo s3 library storage): windows paths converted to unix format
Browse files Browse the repository at this point in the history
  • Loading branch information
sr258 committed Feb 23, 2022
1 parent 668aca2 commit cd9c1c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions packages/h5p-server/src/LibraryManager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Readable } from 'stream';
import fsExtra from 'fs-extra';
import { getAllFiles } from 'get-all-files';
import upath from 'upath';

import H5pError from './helpers/H5pError';
import Logger from './helpers/Logger';
Expand Down Expand Up @@ -94,7 +95,7 @@ export default class LibraryManager {
if (!this.config) {
this.config = {
installLibraryLockMaxOccupationTime: 10000,
installLibraryLockTimeout: 20000
installLibraryLockTimeout: 120000
};
}
}
Expand Down Expand Up @@ -770,7 +771,7 @@ export default class LibraryManager {
fsExtra.createReadStream(fileFullPath);
return this.libraryStorage.addFile(
libraryInfo,
fileLocalPath,
upath.toUnix(fileLocalPath),
readStream
);
})
Expand Down
6 changes: 3 additions & 3 deletions scripts/mongo-s3-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ services:
ports:
- 9000:9000
- 9001:9001
command: ['server', '--console-address', ':9001', '/data']
command: ['server', '/data']
environment:
MINIO_ROOT_USER: minioaccesskey
MINIO_ROOT_PASSWORD: miniosecret
MINIO_ACCESS_KEY: minioaccesskey
MINIO_SECRET_KEY: miniosecret

volumes:
mongodb_data:
Expand Down

0 comments on commit cd9c1c0

Please sign in to comment.