강의

멘토링

로드맵

Cộng đồng Hỏi & Đáp của Inflearn

Hình ảnh hồ sơ của not
not

câu hỏi đã được viết

Next.js với Spring Boot

Đăng ký sản phẩm(1)

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

Đã giải quyết

Viết

·

96

·

Đã chỉnh sửa

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

Quiz

74% người trả lời sai. Hãy thử ngay!

Next.js ISR의 주요 이점은 무엇인가요?

Cập nhật dữ liệu thời gian thực

Giảm tải máy chủ và cải thiện hiệu suất

Kết xuất độc lập phía client

Truy cập trực tiếp cơ sở dữ liệu

Câu trả lời 1

0

zk202308a5410님의 프로필 이미지
zk202308a5410
Người chia sẻ kiến thức

알려주셔서 감사합니다

Hình ảnh hồ sơ của not
not

câu hỏi đã được viết

Đặt câu hỏi