limit max content size to 10MB
This commit is contained in:
@ -543,7 +543,8 @@ const schema = gql`
|
||||
title: String!
|
||||
byline: String
|
||||
dir: String
|
||||
content: String!
|
||||
# max length of 10MB
|
||||
content: String! @sanitize(maxLength: 10485760)
|
||||
textContent: String!
|
||||
length: Int!
|
||||
excerpt: String!
|
||||
@ -559,7 +560,8 @@ const schema = gql`
|
||||
source: String!
|
||||
clientRequestId: ID!
|
||||
title: String
|
||||
originalContent: String!
|
||||
# max length of 10MB
|
||||
originalContent: String! @sanitize(maxLength: 10485760)
|
||||
parseResult: ParseResult
|
||||
state: ArticleSavingRequestStatus
|
||||
labels: [CreateLabelInput!]
|
||||
|
||||
@ -431,7 +431,13 @@ export const updateLibraryItem = async (
|
||||
|
||||
await pubsub.entityUpdated<QueryDeepPartialEntity<LibraryItem>>(
|
||||
EntityType.PAGE,
|
||||
{ ...libraryItem, id },
|
||||
{
|
||||
...libraryItem,
|
||||
id,
|
||||
// don't send original content and readable content
|
||||
originalContent: undefined,
|
||||
readableContent: undefined,
|
||||
},
|
||||
userId
|
||||
)
|
||||
|
||||
@ -535,9 +541,14 @@ export const createLibraryItem = async (
|
||||
userId
|
||||
)
|
||||
|
||||
await pubsub.entityCreated<LibraryItem>(
|
||||
await pubsub.entityCreated<DeepPartial<LibraryItem>>(
|
||||
EntityType.PAGE,
|
||||
newLibraryItem,
|
||||
{
|
||||
...newLibraryItem,
|
||||
// don't send original content and readable content
|
||||
originalContent: undefined,
|
||||
readableContent: undefined,
|
||||
},
|
||||
userId
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user