Git Product home page Git Product logo

Comments (3)

Seungcheol-Lee avatar Seungcheol-Lee commented on August 24, 2024

어떤 기능을 구현하려고 하시는지 잘 감이 안잡히는데요
일단 photo_uploader로 업로드한 이미지명은 textarea(에디터) 상에 img 태그로서 삽입되는 방식이니

  1. 파일 정보를 DB에 저장할때 게시물의 정보가 필요하지 않다면 file_uploader 컨트롤러에서 직접 파일 정보의 VO를 생성하여 DB에 저장
  2. text가 DB에 저장되는 시점에 Jsoup 과 같은 HTML Parser로 전체 text를 HTML Document 데이터구조로 파싱한 뒤 img 태그만 골라서 src 속성의 값을 (필요시 substring을 이용하여 파일명 부분만 따로 뽑아내어) VO 에 저장한 뒤 따로 DB에 저장

이정도 방법이 있을 것 같습니다.

from smarteditor2.

imredcat avatar imredcat commented on August 24, 2024

위2번항과 유사하게 업로드하고 본문에 이미지가 표시 되는 시점에 본문 form에 이미지정보 hidden 필드 추가하여 submit 시 디비에 저장하는 방법이 있습니다.
2번과 마찬가지로 물론 text를 파싱해서 본문에 없는 이미지를 걸러내야 합니다.

from smarteditor2.

 avatar commented on August 24, 2024

감사합니다 덕분에 잘처리했습니다.

from smarteditor2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.