• 로그인
  • 장바구니에 상품이 없습니다.

home2 게시판 React 게시판 파이어베이스 프로필사진

파이어베이스 프로필사진

3 글 보임 - 1 에서 3 까지 (총 3 중에서)
  • 글쓴이
  • #59749

    배해기
    참가자
    리액트로 파이어베이스 사용해서 일반 SNS 사이트느낌의
    제 포트폴리오 방명록같은 사이트를 만들고있습니다.
    
    여기서 회원가입을 해서 로그인한사람만 글을 작성할 수 있게끔 하려는데
    
    회원가입시에 이름넣는건 수업에있어서 회원가입 및 이름넣기는 쉽게되는데
    프로필사진까지 넣고싶습니다. 현재 프로필사진을 넣을 수 있게끔 html css을 다 구현해놓고
    FileReader로 사진 미리볼 수 있게끔도 해놨습니다. 그런데 이걸로
    유저의 프로필사진 설정을 어떻게해아할지 모르겠습니다.
    
    검색해보니 스토리지에 저장해서 사용해야한다 라는거같은데 전부 9버전이라 코드를 알아보기가
    쉽지가않더라구요.. 전부 async await을 사용해서 코드가 제거랑 좀 다르더라구요
    
    현재 코드는
    
    
    위 처럼 함수로 제작해서 버튼에다가 달아줬습니다.
    
    근데 저렇게하니까 스토리지에 이미지파일은 안들어가더라구요..
    글작성에서 이미지넣는건 되던데 왜 안올라갈까요..? 콘솔창에도 아무런것도 출력되지않습니다..ㅜ
    
    
    
    현재까지 구현된 화면은 이런모습입니다.
    프로필 사진 넣는방법좀  알려주세요..ㅠㅠ
    #59774

    배해기
    참가자
    질문이 하나 더있는데 파이어베이스를 사용해서 프로젝트 진행중인데
    페이지 자체에서는 에러로인해 화면이 안뜨거나 하진않는데 터미널에 자꾸 에러가떠있습니다.
    
    
    
    
    작아서 잘 안보이는거같은데 무슨 파일을 못찾는다는 그런에러같습니다
    
    WARNING in ../../../node_modules/@firebase/auth/dist/auth.esm.js
    Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
    Failed to parse source map from 'C:\Users\haegi\node_modules\@firebase\auth\dist\ [synthetic:es6\promise\promise] ' file: Error: ENOENT: no such file or directory, open 'C:\Users\haegi\node_modules\@firebase\auth\dist\ [synthetic:es6\promise\promise] '
    WARNING in ../../../node_modules/@firebase/auth/dist/auth.esm.js
    Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
    Failed to parse source map from 'C:\Users\haegi\node_modules\@firebase\auth\dist\ [synthetic:es6\util\arrayiterator] ' file: Error: ENOENT: no such file or directory, open 'C:\Users\haegi\node_modules\@firebase\auth\dist\ [synthetic:es6\util\arrayiterator] '
    WARNING in ../../../node_modules/@firebase/auth/dist/auth.esm.js
    Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
    Failed to parse source map from 'C:\Users\haegi\node_modules\@firebase\auth\dist\ [synthetic:es6\util\makeiterator] ' file: Error: ENOENT: no such file or directory, open 'C:\Users\haegi\node_modules\@firebase\auth\dist\ [synthetic:es6\util\makeiterator] '
    WARNING in ../../../node_modules/@firebase/auth/dist/auth.esm.js
    Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
    Failed to parse source map from 'C:\Users\haegi\node_modules\@firebase\auth\dist\ [synthetic:util\defineproperty] ' file: Error: ENOENT: no such file or directory, open 'C:\Users\haegi\node_modules\@firebase\auth\dist\ [synthetic:util\defineproperty] '
    WARNING in ../../../node_modules/@firebase/auth/dist/auth.esm.js
    Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
    Failed to parse source map from 'C:\Users\haegi\node_modules\@firebase\auth\dist\ [synthetic:util\global] ' file: Error: ENOENT: no such file or directory, open 'C:\Users\haegi\node_modules\@firebase\auth\dist\ [synthetic:util\global] '
    WARNING in ../../../node_modules/@firebase/auth/dist/auth.esm.js
    Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
    Failed to parse source map from 'C:\Users\haegi\node_modules\@firebase\auth\dist\ [synthetic:util\polyfill] ' file: Error: ENOENT: no such file or directory, open 'C:\Users\haegi\node_modules\@firebase\auth\dist\ [synthetic:util\polyfill] '
    webpack compiled with 6 warnings
    
    이러한 에러인데 없앨방법있을까요?
    #59791

    codingapple
    키 마스터
    updateProfile에 유저이미지 넣는 공간은 없을걸요 
    유저가 가입하면 uid를 이름으로하는 firestore document 하나 만들어주고 거기에 프로필사진 경로라든지 그런걸 저장해둡시다 
    firebase 라이브러리 재설치해보거나 다른프로젝트 하나 더 만들어서 테스트해봅시다
3 글 보임 - 1 에서 3 까지 (총 3 중에서)
  • 답변은 로그인 후 가능합니다.

About

현재 월 700명 신규수강중입니다.

  (09:00~20:00) 빠른 상담은 카톡 플러스친구 코딩애플 (링크)
  admin@codingapple.com
  이용약관, 개인정보처리방침
ⓒ Codingapple, 강의 예제, 영상 복제 금지
top

© Codingapple, All rights reserved. 슈퍼로켓 에듀케이션 / 서울특별시 강동구 고덕로 19길 30 / 사업자등록번호 : 212-26-14752 온라인 교육학원업 / 통신판매업신고번호 : 제 2017-서울강동-0002 호 / 개인정보관리자 : 박종흠