Compare commits

..

7 commits

Author SHA1 Message Date
advplyr
2f219ea3cc
Merge pull request #5325 from mikiher/file-upload-internal-api
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Build and Push Docker Image / build (push) Has been cancelled
Integration Test / build and test (push) Has been cancelled
Run Unit Tests / Run Unit Tests (push) Has been cancelled
Let next.js handle file uploads through internal-api routes
2026-06-25 17:03:34 -05:00
mikiher
56e60b8420 Server.js: Let next.js handle file uploads through internal-api routes 2026-06-23 14:08:16 +03:00
advplyr
9b92b5de34
Merge pull request #5318 from mikiher/match-update-episode-enclosure
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Build and Push Docker Image / build (push) Has been cancelled
Integration Test / build and test (push) Has been cancelled
Run Unit Tests / Run Unit Tests (push) Has been cancelled
Enhance PodcastController to handle enclosure updates
2026-06-20 17:06:32 -05:00
mikiher
3417c0c721 Enhance PodcastController to handle enclosure updates, allowing for null values and object structure validation for enclosure properties. 2026-06-18 12:39:50 +03:00
advplyr
cbda0360aa
Merge pull request #5291 from mikiher/allowed-dev-origins
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Build and Push Docker Image / build (push) Has been cancelled
Integration Test / build and test (push) Has been cancelled
Run Unit Tests / Run Unit Tests (push) Has been cancelled
Read AllowedDevOrigins from dev.js into ALLOWED_DEV_ORIGINS env var
2026-06-04 15:13:34 -05:00
mikiher
036bc081f0 index.js: Read AllowedDevOrigins from dev,js into ALLOWED_DEV_ORIGINS env var 2026-06-04 14:03:59 +03:00
advplyr
e70e4b9d40 Fix typo on onTest notification body
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Build and Push Docker Image / build (push) Has been cancelled
Integration Test / build and test (push) Has been cancelled
Run Unit Tests / Run Unit Tests (push) Has been cancelled
2026-05-30 15:43:50 -05:00
4 changed files with 19 additions and 1 deletions

View file

@ -31,6 +31,11 @@ if (isDev || options['prod-with-dev-env']) {
if (devEnv.AllowIframe) process.env.ALLOW_IFRAME = '1' if (devEnv.AllowIframe) process.env.ALLOW_IFRAME = '1'
if (devEnv.BackupPath) process.env.BACKUP_PATH = devEnv.BackupPath if (devEnv.BackupPath) process.env.BACKUP_PATH = devEnv.BackupPath
if (devEnv.ReactClientPath) process.env.REACT_CLIENT_PATH = devEnv.ReactClientPath if (devEnv.ReactClientPath) process.env.REACT_CLIENT_PATH = devEnv.ReactClientPath
if (devEnv.AllowedDevOrigins) {
process.env.ALLOWED_DEV_ORIGINS = Array.isArray(devEnv.AllowedDevOrigins)
? devEnv.AllowedDevOrigins.join(',')
: String(devEnv.AllowedDevOrigins)
}
process.env.SOURCE = 'local' process.env.SOURCE = 'local'
process.env.ROUTER_BASE_PATH = devEnv.RouterBasePath ?? '/audiobookshelf' process.env.ROUTER_BASE_PATH = devEnv.RouterBasePath ?? '/audiobookshelf'
} }

View file

@ -302,7 +302,9 @@ class Server {
this.server = http.createServer(app) this.server = http.createServer(app)
// Skip file upload parsing for internal-api routes (Next.js proxies read multipart bodies).
router.use( router.use(
/^(?!\/internal-api).*/,
fileUpload({ fileUpload({
defCharset: 'utf8', defCharset: 'utf8',
defParamCharset: 'utf8', defParamCharset: 'utf8',

View file

@ -437,6 +437,17 @@ class PodcastController {
} }
updatePayload[key] = req.body[key] updatePayload[key] = req.body[key]
} else if (key === 'enclosure') {
const enclosure = req.body.enclosure
if (enclosure === null) {
updatePayload.enclosureURL = null
updatePayload.enclosureSize = null
updatePayload.enclosureType = null
} else if (typeof enclosure === 'object' && typeof enclosure.url === 'string') {
updatePayload.enclosureURL = enclosure.url
updatePayload.enclosureType = typeof enclosure.type === 'string' ? enclosure.type : null
updatePayload.enclosureSize = enclosure.length !== undefined && enclosure.length !== null ? enclosure.length : null
}
} else if (key === 'chapters' && Array.isArray(req.body[key]) && req.body[key].every((ch) => typeof ch === 'object' && ch.title && ch.start)) { } else if (key === 'chapters' && Array.isArray(req.body[key]) && req.body[key].every((ch) => typeof ch === 'object' && ch.title && ch.start)) {
updatePayload[key] = req.body[key] updatePayload[key] = req.body[key]
} else if (key === 'publishedAt' && typeof req.body[key] === 'number') { } else if (key === 'publishedAt' && typeof req.body[key] === 'number') {

View file

@ -100,7 +100,7 @@ module.exports.notificationData = {
variables: ['version'], variables: ['version'],
defaults: { defaults: {
title: 'Test Notification on Abs {{version}}', title: 'Test Notification on Abs {{version}}',
body: 'Test notificataion body for abs {{version}}.' body: 'Test notification body for abs {{version}}.'
}, },
testData: { testData: {
version: 'v' + version version: 'v' + version