강의

멘토링

커뮤니티

Inflearn コミュニティ Q&A

not のプロフィール画像
not

投稿した質問数

Next.jsとSpring Boot

商品登録(1)

강의 자료 수정 요청 - Next.js 16 버전의 파일 업로드 사이즈 제한 설정

解決済みの質問

作成

·

24

·

編集済み

0

Next 최신 버전으로 수업 듣고 있습니다.

 

image.png

강의 자료에 이 파일이 들어가있는데 오히려 이 설정을 적용하면 1MB 제한이 걸려 업로드 되지 않습니다

 

발생된 오류 메시지

Error: Body exceeded 1 MB limit.
To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit
    at ignore-listed frames {
  statusCode: 413
}
⨯ uncaughtException: Error: Body exceeded 1 MB limit.
To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit
    at ignore-listed frames {
  statusCode: 413
}
⨯ uncaughtException:  Error: Body exceeded 1 MB limit.
To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit
    at ignore-listed frames {
  statusCode: 413
}
⨯ Error: Body exceeded 1 MB limit.
To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit
    at ignore-listed frames {
  statusCode: 413,
  digest: '2270266421@E394'
}

강의에서 알려주는 설정으로 해야 1MB 이상 이미지가 정상 업로드 되었습니다.

  experimental: {
    // 'experimental' 아래에 serverActions를 정의해야 합니다.
    serverActions: {
      bodySizeLimit: "1000mb", // 원하는 크기로 조절하세요 (예: '50mb', '100mb')
    },
  },

 

강의 자료 수정이 필요할 것 같습니다.

javascriptreactspring-bootjpanext.js

回答 1

0

zk202308a5410님의 프로필 이미지
zk202308a5410
インストラクター

알려주셔서 감사합니다

not のプロフィール画像
not

投稿した質問数

質問する