Coder Social home page Coder Social logo

Support uploading images about drift HOT 4 OPEN

maxleiter avatar maxleiter commented on May 29, 2024
Support uploading images

from drift.

Comments (4)

MaxLeiter avatar MaxLeiter commented on May 29, 2024 1

Probably not, because I feel like the SVGs could be huge compared to the actual image file?

after some thought, I think I am okay with supporting hosting images, but it would require a bit of work. I guess we could embed the image in sqlite, but its probably better to store it as-is and serve it from the folder location on disk. @adyanth any thoughts on this? I appreciate your input 🙏

from drift.

MaxLeiter avatar MaxLeiter commented on May 29, 2024

No, there’s no real technical reason except showing them in the preview rendered. It probably makes most sense to do what GH does and upload images into Markdown and just provide a link, but file hosting (rather than just text) is out of scope for this project imo.

from drift.

adyanth avatar adyanth commented on May 29, 2024

Would converting the image to SVG and embedding it in the file be within scope?

from drift.

adyanth avatar adyanth commented on May 29, 2024

The size would be large when using SVG.

I haven't seen any pros/cons on storing images in the DB vs the filesystem to comment on which would be better.

Storing images in a filesystem path (configurable) is good enough which may (in the future if needed) allow something like nginx serve the bulk static content if necessary. Even cache the content if needed.

I would recommend having a separate endpoint for these content. Also, similar to how GitHub does it, would be better to generate a random filename (and strip metadata) for the images before saving it.

from drift.

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.