mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
reduce max content size to 5MB and 10MB for both content and originalHtml
This commit is contained in:
parent
792cf0b207
commit
b18018ab2e
2 changed files with 2 additions and 3 deletions
|
|
@ -27,7 +27,7 @@ import {
|
|||
SearchResponse,
|
||||
} from './types'
|
||||
|
||||
const MAX_CONTENT_LENGTH = 10 * 1024 * 1024 // 10MB
|
||||
const MAX_CONTENT_LENGTH = 5 * 1024 * 1024 // 5MB and 10MB for both content and originalHtml
|
||||
const CONTENT_LENGTH_ERROR = 'Your page content is too large to be saved.'
|
||||
|
||||
const appendQuery = (builder: ESBuilder, query: string): ESBuilder => {
|
||||
|
|
@ -407,7 +407,6 @@ export const createPage = async (
|
|||
ctx: PageContext
|
||||
): Promise<string | undefined> => {
|
||||
try {
|
||||
// max 10MB
|
||||
if (page.content.length > MAX_CONTENT_LENGTH) {
|
||||
logger.info('page content is too large', {
|
||||
pageId: page.id,
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ export const saveNewsletterEmail = async (
|
|||
color: '#07D2D1',
|
||||
})
|
||||
|
||||
logger.info('newsletter label added: %o', result)
|
||||
logger.info('newsletter label added', { result })
|
||||
|
||||
// sends push notification
|
||||
const deviceTokens = await getDeviceTokensByUserId(newsletterEmail.user.id)
|
||||
|
|
|
|||
Loading…
Reference in a new issue