diff options
| author | randomdan <randomdan@localhost> | 2014-04-11 18:34:57 +0000 |
|---|---|---|
| committer | randomdan <randomdan@localhost> | 2014-04-11 18:34:57 +0000 |
| commit | 8cc8391814acd327a26f5ed0827b95d2c678f5b6 (patch) | |
| tree | e86b7f3bb165d75d35d695237a721c7dcc0e50dd | |
| parent | Support range requests and seekable streams (diff) | |
| download | project2-8cc8391814acd327a26f5ed0827b95d2c678f5b6.tar.bz2 project2-8cc8391814acd327a26f5ed0827b95d2c678f5b6.tar.xz project2-8cc8391814acd327a26f5ed0827b95d2c678f5b6.zip | |
Support content type on a file stream
| -rw-r--r-- | project2/files/fileStream.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/project2/files/fileStream.cpp b/project2/files/fileStream.cpp index df39406..707b37e 100644 --- a/project2/files/fileStream.cpp +++ b/project2/files/fileStream.cpp @@ -12,6 +12,7 @@ class FileStream : public Stream { public: FileStream(ScriptNodePtr p) : Stream(p), + contentType(p, "contenttype", "application/octet-stream"), path(p, "path") { } @@ -37,6 +38,12 @@ class FileStream : public Stream { } } + virtual Glib::ustring getContentType(ExecContext * ec) const override + { + return contentType(ec); + } + + const Variable contentType; const Variable path; }; DECLARE_LOADER("filestream", FileStream); |
