Coder Social home page Coder Social logo

Mime type for files about api HOT 8 CLOSED

o2r-project avatar o2r-project commented on June 12, 2024
Mime type for files

from api.

Comments (8)

JanKoppe avatar JanKoppe commented on June 12, 2024

I've started documenting this in #18. A PR for a implementation in muncher exists, though the code is extremely basic (recognition only based on file extension, not actual content).

We would need to properly define the mappings between file extension and reported MIME types. Right now scripts (e.g. R scripts) are reported as application/octet-stream, though interpreting them as text/plain would make much more sense.

from api.

jansule avatar jansule commented on June 12, 2024

Here is a list of files we want to display (for now; each bulletpoint should have its own MIME type):

  • svg
  • geotiff
  • all other image files which can be displayed via <img>
  • video files
  • audio files
  • .csv files
  • everything else will be displayed as plain/text
  • RData might be displayed differently

from api.

nuest avatar nuest commented on June 12, 2024

custom mime types can be configured in this file in the muncher: https://github.com/o2r-project/o2r-muncher/blob/master/config/custom-mime.json

from api.

nuest avatar nuest commented on June 12, 2024

@jansule Can you please check files from your list and clearly mark which ones do not work yet?

from api.

jansule avatar jansule commented on June 12, 2024

File types successfully tested:

  • application/pdf
  • all other image files which can be displayed via <img>
  • everything else will be displayed as plain/text
  • svg
  • geotiff
  • video files
  • audio files
  • .csv files
  • RData might be displayed differently (how? call head in an R session?)
  • markdown
  • RMarkdown - treat specially?
  • shapefile

from api.

nuest avatar nuest commented on June 12, 2024

@jansule prepares an example compendium with all potentially relevant file types

  • example compendium

from api.

nuest avatar nuest commented on June 12, 2024

@jansule Please update the list of files that have not been tested yet here. And feel free to create an example compendium with all file types as part of o2r-muncher (in test/bagtainers).

Thanks!

from api.

nuest avatar nuest commented on June 12, 2024

@jansule please update!

from api.

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.