Code Monkey home page Code Monkey logo

Comments (7)

alexanderjulo avatar alexanderjulo commented on August 16, 2024

Can you give me some details on what exactly you tried and did not work? 🙂 Theoretically this should just work as usually!

from wiki.

machinekoder avatar machinekoder commented on August 16, 2024

I tried following:

![chip](./chip_pinouts.jpg)
![chip](./chip-motor/chip_pinouts.jpg)
![chip](./chip_pinouts)
<img src="./chip_pinouts">chip<img>

The Markdown file is called chip-motor.md and the image is in ./chip-motor/chip_pinouts.jpg

Are there any restrictions on the image format?

from wiki.

alexanderjulo avatar alexanderjulo commented on August 16, 2024

Yeah looking at the code I don't think we support static files at all at the moment. There are multiple issues at hand here and I need to think about how we can solve them best.

I see the following approaches:
(1) Expose all raw files via URL: Does not work because that might also expose the config.py including the secret key and potentially other files
(2) Making a directory configurable that will allow serving of static files: This would work but comes with the problem that the user will not be able to store images with the respective documents, which is kind of sad.

I am open to input before starting to implement anything. 🙂

from wiki.

machinekoder avatar machinekoder commented on August 16, 2024

How about exposing all files with an image extension? png, jpg, gif, svg, ...

from wiki.

alexanderjulo avatar alexanderjulo commented on August 16, 2024

Well the problem there is, that the list is never going to be comprehensive (i.e. you might want to expose a pdf file or even a python script but still not the config.py or things along these lines. So we will either exclude files people want to share or will include files people do not want to share, which sucks.

I'll think about it.

from wiki.

machinekoder avatar machinekoder commented on August 16, 2024

Or maybe both:
Whitelist and blacklist in the config.py with reasonable defaults.

from wiki.

Deusdeorum avatar Deusdeorum commented on August 16, 2024

why not serve the images in a route with send_from_directory?

from wiki.

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.