o2r-project / o2r-contentbutler Goto Github PK
View Code? Open in Web Editor NEWSuperseeded by https://github.com/o2r-project/o2r-transporter
Home Page: http://o2r.info
License: Apache License 2.0
Superseeded by https://github.com/o2r-project/o2r-transporter
Home Page: http://o2r.info
License: Apache License 2.0
As seen in the o2r-muncher file listings, the MIME types of files can easily be reported with the mime
npm module. We should probably use this also in contentbutler, as it is a more consistent (i.e. filter by image/*
, text/*
) and easier to maintain (add extension to types
definition) solution.
write a doc explaining how to integrate this service with e.g. nginx. location with regular expressions seem to be the easiest way.
@JanKoppe was not really happy with the name... in line with "muncher" I suggest to make it at least "a person"/use active voice, so rename to o2r-dataserver
. And then it's not far to butlers
@JanKoppe Do you imagine this microservice also being the one serving access to complete compendia? Or would you do that in a different one? In case of a different one, a more focussed name would be o2r-contentbutler
, the one for complete compendia could be o2r-compendiumbutler
Just saw that the parseInteger
check has no else clause: https://github.com/o2r-project/o2r-dataserve/blob/master/lib/resize.js#L48
Should this not be communicated to the client as a 400
error?
errors are directly pushed to the client. there needs to be a abstraction layer and better logging.
We have a Piwik instance running, so we could use it's reporting API to observe direkt calls to the API (which might not come from our website).
Alternatively (or preferably, we can simply analyse the nginx and webapp logs. See discussion below.
mitigations for directory traversal are missing.
Can we easily add tiff
to https://github.com/o2r-project/o2r-dataserve/blob/master/lib/resize.js ?
Maybe we can extract a list of supported formats from the underlying system library?
Add a check running at the startup of the service to see if the required library is installed, and log the version, probably both using convert --version
Provide previews (e.g. by overloading the "size" parameter even more) of PDF documents.
1
or any higher integer would return a JPG of the first page. PDF subsetting (i.e. returning a shorter PDF document) does not make sense for a simple preview.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.