File handlers
Table of Contents
Introduction
File handlers are Manyfold’s way of choosing what to do with the various files it knows about. Depending on the file format, Manyfold can do server-side rendering, generate open links, display a browser-side 3d rendering, and more. Almost everything Manyfold does goes through a file handler in some way.
There are a few important concepts that all file handlers share:
INPUT_TYPES: a list of media types that the handler can read.OUTPUT_TYPES: a list of media types that the handler can write.ENVIRONMENTS: a list of execution environments that the handler can operate in. This is explained more below.
All file handlers are classes derived from FileHandlers::Base, and should be in the FileHandlers module.; this base class handles most of the work of a file handler, often you just need to fill in the parts specific to your implementation.
class FileHandlers::ExampleSlicer < FileHandlers::Base
...
end
Input & Output types
More coming soon! See the file handler in our example plugin in the meantime.