2022-05-10 T.I.L

정종훈·2022년 5월 18일
0

final project

목록 보기
7/8

주제) 이미지 여러개 업로드

console.log(req.files)
[
  {
    fieldname: 'file',
    originalname: 'Untitled (3).png',
    encoding: '7bit',
    mimetype: 'image/png',
    size: 80939,
    bucket: 'testburkey',
    key: 'images/1652174467255png',
    acl: 'private',
    contentType: 'application/octet-stream',
    contentDisposition: null,
    contentEncoding: null,
    storageClass: 'STANDARD',
    serverSideEncryption: null,
    metadata: null,
    location: 'https://testburkey.s3.ap-northeast-2.amazonaws.com/images/1652174467255png',
    etag: '"5f5d457aeda53e3cb4dc4b1776b3f9bb"',
    versionId: undefined
  },
  {
    fieldname: 'file',
    originalname: 'Untitled (1).png',
    encoding: '7bit',
    mimetype: 'image/png',
    size: 46393,
    bucket: 'testburkey',
    key: 'images/1652174467261png',
    acl: 'private',
    contentType: 'application/octet-stream',
    contentDisposition: null,
    contentEncoding: null,
    storageClass: 'STANDARD',
    serverSideEncryption: null,
    metadata: null,
    location: 'https://testburkey.s3.ap-northeast-2.amazonaws.com/images/1652174467261png',
    etag: '"03f8d92dd105334761db2fceada4d877"',
    versionId: undefined
  }
]

문제)

req로 사진개수가 몇개 올지 모른다.

그런데 사진개수 마다 create로 컬럼을 만들어 줘야함..

profile
괴발개발자에서 개발자로 향해보자

0개의 댓글