Skip to content

Commit

Permalink
Merge pull request #332 from nextcloud/fix/max-file-upload-size
Browse files Browse the repository at this point in the history
add max-upload-file-size config value for maxHttpBufferSize
  • Loading branch information
grnd-alt authored Jan 16, 2025
2 parents 2573826 + b3220b7 commit b2aedab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions websocket_server/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ const Config = {

MAX_BACKUPS_PER_ROOM: process.env.MAX_BACKUPS_PER_ROOM || DEFAULT_MAX_BACKUPS_PER_ROOM,

MAX_UPLOAD_FILE_SIZE: process.env.MAX_UPLOAD_FILE_SIZE * (1e6) || 2e6,

LOCK_TIMEOUT: process.env.LOCK_TIMEOUT || DEFAULT_LOCK_TIMEOUT,

LOCK_RETRY_INTERVAL: process.env.LOCK_RETRY_INTERVAL || DEFAULT_LOCK_RETRY_INTERVAL,
Expand Down
1 change: 1 addition & 0 deletions websocket_server/SocketManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default class SocketManager {
createSocketServer(server) {
return new SocketIO(server, {
transports: ['websocket', 'polling'],
maxHttpBufferSize: Config.MAX_UPLOAD_FILE_SIZE + 1e6,
cors: {
origin: Config.NEXTCLOUD_WEBSOCKET_URL,
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
Expand Down

0 comments on commit b2aedab

Please sign in to comment.