From d47bcdff649eb01c101fc2a3ae53817eaa62f641 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 23 Dec 2016 18:47:38 +0100 Subject: [PATCH] Web app update --- .gitignore | 15 +- QtClient/JoplinQtClient/make.bat | 17 + QtClient/JoplinQtClient/schema.sql | 11 + QtClient/evernote-import/main.cpp | 38 +- app/config/services.yml | 16 +- app/data/mime.types | 1853 +++++++++++++++++ app/data/mime_types.php | 1 + app/data/uploads/.gitkeep | 0 cli-client/main.php | 28 +- spa_client/.babelrc | 12 + spa_client/.gitignore | 39 + spa_client/README.md | 19 + spa_client/package.json | 42 + spa_client/server.js | 32 + spa_client/src/index.html | 39 + spa_client/src/js/app.jsx | 420 ++++ spa_client/src/js/components/folder-list.jsx | 39 + spa_client/src/js/components/folder.jsx | 50 + spa_client/src/js/components/my-button.js | 11 + .../src/js/components/note-list-item.jsx | 28 + spa_client/src/js/components/note-list.jsx | 37 + .../src/js/components/root-folder-list.jsx | 31 + spa_client/src/js/models/folder-item.jsx | 42 + spa_client/src/js/reducer.jsx | 32 + spa_client/src/js/simple-example.js | 128 ++ spa_client/webpack.config.js | 38 + spa_client/webpack.dev.config.js | 32 + src/AppBundle/ApiSerializer.php | 9 + .../Command/BuildMimeTypeArrayCommand.php | 84 + src/AppBundle/Controller/ApiController.php | 5 + src/AppBundle/Controller/FilesController.php | 61 + src/AppBundle/Controller/UsersController.php | 44 +- src/AppBundle/Eloquent.php | 11 +- src/AppBundle/MimeTypes.php | 84 + src/AppBundle/Model/BaseItem.php | 45 + src/AppBundle/Model/BaseModel.php | 12 +- src/AppBundle/Model/File.php | 52 + src/AppBundle/Model/Folder.php | 2 +- src/AppBundle/Model/Note.php | 2 +- src/AppBundle/Model/Tag.php | 78 + src/AppBundle/Model/Tagged_item.php | 7 + src/AppBundle/Paths.php | 25 + structure.sql | 52 +- .../Controller/DefaultControllerTest.php | 18 + tests/Model/BaseItemTest.php | 25 + tests/Model/ChangeTest.php | 12 +- tests/Model/TagTest.php | 71 + 47 files changed, 3676 insertions(+), 73 deletions(-) create mode 100755 QtClient/JoplinQtClient/make.bat create mode 100755 app/data/mime.types create mode 100755 app/data/mime_types.php create mode 100644 app/data/uploads/.gitkeep create mode 100755 spa_client/.babelrc create mode 100755 spa_client/.gitignore create mode 100755 spa_client/README.md create mode 100755 spa_client/package.json create mode 100755 spa_client/server.js create mode 100755 spa_client/src/index.html create mode 100755 spa_client/src/js/app.jsx create mode 100755 spa_client/src/js/components/folder-list.jsx create mode 100755 spa_client/src/js/components/folder.jsx create mode 100755 spa_client/src/js/components/my-button.js create mode 100755 spa_client/src/js/components/note-list-item.jsx create mode 100755 spa_client/src/js/components/note-list.jsx create mode 100755 spa_client/src/js/components/root-folder-list.jsx create mode 100755 spa_client/src/js/models/folder-item.jsx create mode 100755 spa_client/src/js/reducer.jsx create mode 100755 spa_client/src/js/simple-example.js create mode 100755 spa_client/webpack.config.js create mode 100755 spa_client/webpack.dev.config.js create mode 100755 src/AppBundle/ApiSerializer.php create mode 100755 src/AppBundle/Command/BuildMimeTypeArrayCommand.php create mode 100755 src/AppBundle/Controller/FilesController.php create mode 100755 src/AppBundle/MimeTypes.php create mode 100755 src/AppBundle/Model/BaseItem.php create mode 100755 src/AppBundle/Model/File.php create mode 100755 src/AppBundle/Model/Tag.php create mode 100755 src/AppBundle/Model/Tagged_item.php create mode 100755 src/AppBundle/Paths.php create mode 100755 tests/AppBundle/Controller/DefaultControllerTest.php create mode 100755 tests/Model/BaseItemTest.php create mode 100755 tests/Model/TagTest.php diff --git a/.gitignore b/.gitignore index 07cde2866..f850c8dce 100755 --- a/.gitignore +++ b/.gitignore @@ -15,12 +15,13 @@ /vendor/ /web/bundles/ *.sublime-workspace -database.sqlite -QtClient/build-*-Debug/ -*.pro.user -notes*.sqlite +Makefile.Debug +Makefile.Release Makefile -Makefile.* +QtClient/build-* TODO.md -tests/generated -QtClient/JoplinQtClient/make.bat \ No newline at end of file +*.pro.user +QtClient/data/ +app/data/uploads/ +!app/data/uploads/.gitkeep +sparse_test.php \ No newline at end of file diff --git a/QtClient/JoplinQtClient/make.bat b/QtClient/JoplinQtClient/make.bat new file mode 100755 index 000000000..5b66b7af9 --- /dev/null +++ b/QtClient/JoplinQtClient/make.bat @@ -0,0 +1,17 @@ +SET PATH=%PATH%;"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin" + +cd "D:\Web\www\joplin\QtClient\build-evernote-import-qt-Visual_C_32_bites-Debug" +if %errorlevel% neq 0 exit /b %errorlevel% + +"C:\Qt\5.7\msvc2015\bin\qmake.exe" D:\Web\www\joplin\QtClient\evernote-import\evernote-import-qt.pro -spec win32-msvc2015 "CONFIG+=debug" "CONFIG+=qml_debug" +if %errorlevel% neq 0 exit /b %errorlevel% + +"C:\Qt\Tools\QtCreator\bin\jom.exe" qmake_all +if %errorlevel% neq 0 exit /b %errorlevel% + +"C:\Qt\Tools\QtCreator\bin\jom.exe" +if %errorlevel% neq 0 exit /b %errorlevel% + + + +/cygdrive/c/Qt/Tools/QtCreator/bin/jom.exe \ No newline at end of file diff --git a/QtClient/JoplinQtClient/schema.sql b/QtClient/JoplinQtClient/schema.sql index 1557dafc7..035d354bf 100755 --- a/QtClient/JoplinQtClient/schema.sql +++ b/QtClient/JoplinQtClient/schema.sql @@ -58,4 +58,15 @@ CREATE TABLE version ( version INT ); +--CREATE TABLE mimetypes ( +-- id INT, +-- mime TEXT +--); + +--CREATE TABLE mimetype_extensions ( +-- id INTEGER PRIMARY KEY, +-- mimetype_id, +-- extension TEXT +--); + INSERT INTO version (version) VALUES (1); diff --git a/QtClient/evernote-import/main.cpp b/QtClient/evernote-import/main.cpp index 807fb851a..b9f0428eb 100755 --- a/QtClient/evernote-import/main.cpp +++ b/QtClient/evernote-import/main.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include "xmltomd.h" @@ -164,7 +165,18 @@ xmltomd::Resource parseResource(QXmlStreamReader& reader) { return xmltomd::Resource(); } - output.data = QByteArray::fromBase64(reader.readElementText().toUtf8()); + + //qApp->exit(0); + + QByteArray ba; +// qDebug() << reader.text(); +// qApp->exit(0); + QString s = reader.readElementText(); + s = s.replace("\n", ""); + ba.append(s); + output.data = QByteArray::fromBase64(ba); +// qDebug() << output.data.toBase64(); +// exit(0); } else if (reader.name() == "mime") { output.mime = reader.readElementText(); } else if (reader.name() == "resource-attributes") { @@ -282,7 +294,7 @@ Note parseNote(QXmlStreamReader& reader) { // int mediaHashIndex = 0; - for (int i = 0; i < note.resources.size(); i++) { + for (size_t i = 0; i < note.resources.size(); i++) { xmltomd::Resource& r = note.resources[i]; if (r.id == "") { if (note.enMediaElements.size() <= mediaHashIndex) { @@ -339,6 +351,13 @@ void filePutContents(const QString& filePath, const QString& content) { } } +QString extensionFromMimeType(const QString& mimeType) { + if (mimeType == "image/jpg" || mimeType == "image/jpeg") return ".jpg"; + if (mimeType == "image/png") return ".png"; + if (mimeType == "image/gif") return ".gif"; + return ""; +} + int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); @@ -387,9 +406,9 @@ int main(int argc, char *argv[]) { std::vector notes = parseXmlFile(fileInfo.absoluteFilePath()); - for (int noteIndex = 0; noteIndex < notes.size(); noteIndex++) { + for (size_t noteIndex = 0; noteIndex < notes.size(); noteIndex++) { Note n = notes[noteIndex]; - for (int resourceIndex = 0; resourceIndex < n.resources.size(); resourceIndex++) { + for (size_t resourceIndex = 0; resourceIndex < n.resources.size(); resourceIndex++) { xmltomd::Resource resource = n.resources[resourceIndex]; QSqlQuery query(db); query.prepare("INSERT INTO resources (id, title, mime, filename, created_time, updated_time) VALUES (?,?,?,?,?,?)"); @@ -406,10 +425,19 @@ int main(int argc, char *argv[]) { query.addBindValue(resource.id); query.addBindValue(n.id); query.exec(); + + QString resourceFilePath = resourceDir + "/" + resource.id; //+ extensionFromMimeType(resource.mime); + QFile resourceFile(resourceFilePath); + if (resourceFile.open(QIODevice::WriteOnly | QIODevice::Truncate)) { + QDataStream stream(&resourceFile); + stream << resource.data; + } else { + qWarning() << "Cannot write to" << resourceFilePath; + } } } - for (int noteIndex = 0; noteIndex < notes.size(); noteIndex++) { + for (size_t noteIndex = 0; noteIndex < notes.size(); noteIndex++) { Note n = notes[noteIndex]; // if (i != 8 || noteIndex != 3090) continue; diff --git a/app/config/services.yml b/app/config/services.yml index 297f1b517..8d921efcd 100755 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -7,11 +7,15 @@ services: app.eloquent: class: AppBundle\Eloquent - arguments: [] - - # app.fine_diff: - # class: AppBundle\FineDiff - # arguments: [] + arguments: ['@app.mime_types', '@app.paths'] twig.exception_listener: - class: stdObject \ No newline at end of file + class: stdObject + + app.paths: + class: AppBundle\Paths + arguments: [%kernel.root_dir%] + + app.mime_types: + class: AppBundle\MimeTypes + arguments: ['@app.paths'] diff --git a/app/data/mime.types b/app/data/mime.types new file mode 100755 index 000000000..498020014 --- /dev/null +++ b/app/data/mime.types @@ -0,0 +1,1853 @@ +# This file maps Internet media types to unique file extension(s). +# Although created for httpd, this file is used by many software systems +# and has been placed in the public domain for unlimited redisribution. +# +# The table below contains both registered and (common) unregistered types. +# A type that has no unique extension can be ignored -- they are listed +# here to guide configurations toward known types and to make it easier to +# identify "new" types. File extensions are also commonly used to indicate +# content languages and encodings, so choose them carefully. +# +# Internet media types should be registered as described in RFC 4288. +# The registry is at . +# +# MIME type (lowercased) Extensions +# ============================================ ========== +# application/1d-interleaved-parityfec +# application/3gpdash-qoe-report+xml +# application/3gpp-ims+xml +# application/a2l +# application/activemessage +# application/alto-costmap+json +# application/alto-costmapfilter+json +# application/alto-directory+json +# application/alto-endpointcost+json +# application/alto-endpointcostparams+json +# application/alto-endpointprop+json +# application/alto-endpointpropparams+json +# application/alto-error+json +# application/alto-networkmap+json +# application/alto-networkmapfilter+json +# application/aml +application/andrew-inset ez +# application/applefile +application/applixware aw +# application/atf +# application/atfx +application/atom+xml atom +application/atomcat+xml atomcat +# application/atomdeleted+xml +# application/atomicmail +application/atomsvc+xml atomsvc +# application/atxml +# application/auth-policy+xml +# application/bacnet-xdd+zip +# application/batch-smtp +# application/beep+xml +# application/calendar+json +# application/calendar+xml +# application/call-completion +# application/cals-1840 +# application/cbor +# application/ccmp+xml +application/ccxml+xml ccxml +# application/cdfx+xml +application/cdmi-capability cdmia +application/cdmi-container cdmic +application/cdmi-domain cdmid +application/cdmi-object cdmio +application/cdmi-queue cdmiq +# application/cdni +# application/cea +# application/cea-2018+xml +# application/cellml+xml +# application/cfw +# application/cms +# application/cnrp+xml +# application/coap-group+json +# application/commonground +# application/conference-info+xml +# application/cpl+xml +# application/csrattrs +# application/csta+xml +# application/cstadata+xml +# application/csvm+json +application/cu-seeme cu +# application/cybercash +# application/dash+xml +# application/dashdelta +application/davmount+xml davmount +# application/dca-rft +# application/dcd +# application/dec-dx +# application/dialog-info+xml +# application/dicom +# application/dii +# application/dit +# application/dns +application/docbook+xml dbk +# application/dskpp+xml +application/dssc+der dssc +application/dssc+xml xdssc +# application/dvcs +application/ecmascript ecma +# application/edi-consent +# application/edi-x12 +# application/edifact +# application/efi +# application/emergencycalldata.comment+xml +# application/emergencycalldata.deviceinfo+xml +# application/emergencycalldata.providerinfo+xml +# application/emergencycalldata.serviceinfo+xml +# application/emergencycalldata.subscriberinfo+xml +application/emma+xml emma +# application/emotionml+xml +# application/encaprtp +# application/epp+xml +application/epub+zip epub +# application/eshop +# application/example +application/exi exi +# application/fastinfoset +# application/fastsoap +# application/fdt+xml +# application/fits +# application/font-sfnt +application/font-tdpfr pfr +application/font-woff woff +# application/framework-attributes+xml +# application/geo+json +application/gml+xml gml +application/gpx+xml gpx +application/gxf gxf +# application/gzip +# application/h224 +# application/held+xml +# application/http +application/hyperstudio stk +# application/ibe-key-request+xml +# application/ibe-pkg-reply+xml +# application/ibe-pp-data +# application/iges +# application/im-iscomposing+xml +# application/index +# application/index.cmd +# application/index.obj +# application/index.response +# application/index.vnd +application/inkml+xml ink inkml +# application/iotp +application/ipfix ipfix +# application/ipp +# application/isup +# application/its+xml +application/java-archive jar +application/java-serialized-object ser +application/java-vm class +application/javascript js +# application/jose +# application/jose+json +# application/jrd+json +application/json json +# application/json-patch+json +# application/json-seq +application/jsonml+json jsonml +# application/jwk+json +# application/jwk-set+json +# application/jwt +# application/kpml-request+xml +# application/kpml-response+xml +# application/ld+json +# application/lgr+xml +# application/link-format +# application/load-control+xml +application/lost+xml lostxml +# application/lostsync+xml +# application/lxf +application/mac-binhex40 hqx +application/mac-compactpro cpt +# application/macwriteii +application/mads+xml mads +application/marc mrc +application/marcxml+xml mrcx +application/mathematica ma nb mb +application/mathml+xml mathml +# application/mathml-content+xml +# application/mathml-presentation+xml +# application/mbms-associated-procedure-description+xml +# application/mbms-deregister+xml +# application/mbms-envelope+xml +# application/mbms-msk+xml +# application/mbms-msk-response+xml +# application/mbms-protection-description+xml +# application/mbms-reception-report+xml +# application/mbms-register+xml +# application/mbms-register-response+xml +# application/mbms-schedule+xml +# application/mbms-user-service-description+xml +application/mbox mbox +# application/media-policy-dataset+xml +# application/media_control+xml +application/mediaservercontrol+xml mscml +# application/merge-patch+json +application/metalink+xml metalink +application/metalink4+xml meta4 +application/mets+xml mets +# application/mf4 +# application/mikey +application/mods+xml mods +# application/moss-keys +# application/moss-signature +# application/mosskey-data +# application/mosskey-request +application/mp21 m21 mp21 +application/mp4 mp4s +# application/mpeg4-generic +# application/mpeg4-iod +# application/mpeg4-iod-xmt +# application/mrb-consumer+xml +# application/mrb-publish+xml +# application/msc-ivr+xml +# application/msc-mixer+xml +application/msword doc dot +application/mxf mxf +# application/nasdata +# application/news-checkgroups +# application/news-groupinfo +# application/news-transmission +# application/nlsml+xml +# application/nss +# application/ocsp-request +# application/ocsp-response +application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy +application/oda oda +# application/odx +application/oebps-package+xml opf +application/ogg ogx +application/omdoc+xml omdoc +application/onenote onetoc onetoc2 onetmp onepkg +application/oxps oxps +# application/p2p-overlay+xml +# application/parityfec +application/patch-ops-error+xml xer +application/pdf pdf +# application/pdx +application/pgp-encrypted pgp +# application/pgp-keys +application/pgp-signature asc sig +application/pics-rules prf +# application/pidf+xml +# application/pidf-diff+xml +application/pkcs10 p10 +# application/pkcs12 +application/pkcs7-mime p7m p7c +application/pkcs7-signature p7s +application/pkcs8 p8 +application/pkix-attr-cert ac +application/pkix-cert cer +application/pkix-crl crl +application/pkix-pkipath pkipath +application/pkixcmp pki +application/pls+xml pls +# application/poc-settings+xml +application/postscript ai eps ps +# application/ppsp-tracker+json +# application/problem+json +# application/problem+xml +# application/provenance+xml +# application/prs.alvestrand.titrax-sheet +application/prs.cww cww +# application/prs.hpub+zip +# application/prs.nprend +# application/prs.plucker +# application/prs.rdf-xml-crypt +# application/prs.xsf+xml +application/pskc+xml pskcxml +# application/qsig +# application/raptorfec +# application/rdap+json +application/rdf+xml rdf +application/reginfo+xml rif +application/relax-ng-compact-syntax rnc +# application/remote-printing +# application/reputon+json +application/resource-lists+xml rl +application/resource-lists-diff+xml rld +# application/rfc+xml +# application/riscos +# application/rlmi+xml +application/rls-services+xml rs +application/rpki-ghostbusters gbr +application/rpki-manifest mft +application/rpki-roa roa +# application/rpki-updown +application/rsd+xml rsd +application/rss+xml rss +application/rtf rtf +# application/rtploopback +# application/rtx +# application/samlassertion+xml +# application/samlmetadata+xml +application/sbml+xml sbml +# application/scaip+xml +# application/scim+json +application/scvp-cv-request scq +application/scvp-cv-response scs +application/scvp-vp-request spq +application/scvp-vp-response spp +application/sdp sdp +# application/sep+xml +# application/sep-exi +# application/session-info +# application/set-payment +application/set-payment-initiation setpay +# application/set-registration +application/set-registration-initiation setreg +# application/sgml +# application/sgml-open-catalog +application/shf+xml shf +# application/sieve +# application/simple-filter+xml +# application/simple-message-summary +# application/simplesymbolcontainer +# application/slate +# application/smil +application/smil+xml smi smil +# application/smpte336m +# application/soap+fastinfoset +# application/soap+xml +application/sparql-query rq +application/sparql-results+xml srx +# application/spirits-event+xml +# application/sql +application/srgs gram +application/srgs+xml grxml +application/sru+xml sru +application/ssdl+xml ssdl +application/ssml+xml ssml +# application/tamp-apex-update +# application/tamp-apex-update-confirm +# application/tamp-community-update +# application/tamp-community-update-confirm +# application/tamp-error +# application/tamp-sequence-adjust +# application/tamp-sequence-adjust-confirm +# application/tamp-status-query +# application/tamp-status-response +# application/tamp-update +# application/tamp-update-confirm +application/tei+xml tei teicorpus +application/thraud+xml tfi +# application/timestamp-query +# application/timestamp-reply +application/timestamped-data tsd +# application/ttml+xml +# application/tve-trigger +# application/ulpfec +# application/urc-grpsheet+xml +# application/urc-ressheet+xml +# application/urc-targetdesc+xml +# application/urc-uisocketdesc+xml +# application/vcard+json +# application/vcard+xml +# application/vemmi +# application/vividence.scriptfile +# application/vnd.3gpp-prose+xml +# application/vnd.3gpp-prose-pc3ch+xml +# application/vnd.3gpp.access-transfer-events+xml +# application/vnd.3gpp.bsf+xml +# application/vnd.3gpp.mid-call+xml +application/vnd.3gpp.pic-bw-large plb +application/vnd.3gpp.pic-bw-small psb +application/vnd.3gpp.pic-bw-var pvb +# application/vnd.3gpp.sms +# application/vnd.3gpp.sms+xml +# application/vnd.3gpp.srvcc-ext+xml +# application/vnd.3gpp.srvcc-info+xml +# application/vnd.3gpp.state-and-event-info+xml +# application/vnd.3gpp.ussd+xml +# application/vnd.3gpp2.bcmcsinfo+xml +# application/vnd.3gpp2.sms +application/vnd.3gpp2.tcap tcap +# application/vnd.3lightssoftware.imagescal +application/vnd.3m.post-it-notes pwn +application/vnd.accpac.simply.aso aso +application/vnd.accpac.simply.imp imp +application/vnd.acucobol acu +application/vnd.acucorp atc acutc +application/vnd.adobe.air-application-installer-package+zip air +# application/vnd.adobe.flash.movie +application/vnd.adobe.formscentral.fcdt fcdt +application/vnd.adobe.fxp fxp fxpl +# application/vnd.adobe.partial-upload +application/vnd.adobe.xdp+xml xdp +application/vnd.adobe.xfdf xfdf +# application/vnd.aether.imp +# application/vnd.ah-barcode +application/vnd.ahead.space ahead +application/vnd.airzip.filesecure.azf azf +application/vnd.airzip.filesecure.azs azs +application/vnd.amazon.ebook azw +# application/vnd.amazon.mobi8-ebook +application/vnd.americandynamics.acc acc +application/vnd.amiga.ami ami +# application/vnd.amundsen.maze+xml +application/vnd.android.package-archive apk +# application/vnd.anki +application/vnd.anser-web-certificate-issue-initiation cii +application/vnd.anser-web-funds-transfer-initiation fti +application/vnd.antix.game-component atx +# application/vnd.apache.thrift.binary +# application/vnd.apache.thrift.compact +# application/vnd.apache.thrift.json +# application/vnd.api+json +application/vnd.apple.installer+xml mpkg +application/vnd.apple.mpegurl m3u8 +# application/vnd.arastra.swi +application/vnd.aristanetworks.swi swi +# application/vnd.artsquare +application/vnd.astraea-software.iota iota +application/vnd.audiograph aep +# application/vnd.autopackage +# application/vnd.avistar+xml +# application/vnd.balsamiq.bmml+xml +# application/vnd.balsamiq.bmpr +# application/vnd.bekitzur-stech+json +# application/vnd.biopax.rdf+xml +application/vnd.blueice.multipass mpm +# application/vnd.bluetooth.ep.oob +# application/vnd.bluetooth.le.oob +application/vnd.bmi bmi +application/vnd.businessobjects rep +# application/vnd.cab-jscript +# application/vnd.canon-cpdl +# application/vnd.canon-lips +# application/vnd.cendio.thinlinc.clientconf +# application/vnd.century-systems.tcp_stream +application/vnd.chemdraw+xml cdxml +# application/vnd.chess-pgn +application/vnd.chipnuts.karaoke-mmd mmd +application/vnd.cinderella cdy +# application/vnd.cirpack.isdn-ext +# application/vnd.citationstyles.style+xml +application/vnd.claymore cla +application/vnd.cloanto.rp9 rp9 +application/vnd.clonk.c4group c4g c4d c4f c4p c4u +application/vnd.cluetrust.cartomobile-config c11amc +application/vnd.cluetrust.cartomobile-config-pkg c11amz +# application/vnd.coffeescript +# application/vnd.collection+json +# application/vnd.collection.doc+json +# application/vnd.collection.next+json +# application/vnd.comicbook+zip +# application/vnd.commerce-battelle +application/vnd.commonspace csp +application/vnd.contact.cmsg cdbcmsg +# application/vnd.coreos.ignition+json +application/vnd.cosmocaller cmc +application/vnd.crick.clicker clkx +application/vnd.crick.clicker.keyboard clkk +application/vnd.crick.clicker.palette clkp +application/vnd.crick.clicker.template clkt +application/vnd.crick.clicker.wordbank clkw +application/vnd.criticaltools.wbs+xml wbs +application/vnd.ctc-posml pml +# application/vnd.ctct.ws+xml +# application/vnd.cups-pdf +# application/vnd.cups-postscript +application/vnd.cups-ppd ppd +# application/vnd.cups-raster +# application/vnd.cups-raw +# application/vnd.curl +application/vnd.curl.car car +application/vnd.curl.pcurl pcurl +# application/vnd.cyan.dean.root+xml +# application/vnd.cybank +application/vnd.dart dart +application/vnd.data-vision.rdz rdz +# application/vnd.debian.binary-package +application/vnd.dece.data uvf uvvf uvd uvvd +application/vnd.dece.ttml+xml uvt uvvt +application/vnd.dece.unspecified uvx uvvx +application/vnd.dece.zip uvz uvvz +application/vnd.denovo.fcselayout-link fe_launch +# application/vnd.desmume.movie +# application/vnd.dir-bi.plate-dl-nosuffix +# application/vnd.dm.delegation+xml +application/vnd.dna dna +# application/vnd.document+json +application/vnd.dolby.mlp mlp +# application/vnd.dolby.mobile.1 +# application/vnd.dolby.mobile.2 +# application/vnd.doremir.scorecloud-binary-document +application/vnd.dpgraph dpg +application/vnd.dreamfactory dfac +# application/vnd.drive+json +application/vnd.ds-keypoint kpxx +# application/vnd.dtg.local +# application/vnd.dtg.local.flash +# application/vnd.dtg.local.html +application/vnd.dvb.ait ait +# application/vnd.dvb.dvbj +# application/vnd.dvb.esgcontainer +# application/vnd.dvb.ipdcdftnotifaccess +# application/vnd.dvb.ipdcesgaccess +# application/vnd.dvb.ipdcesgaccess2 +# application/vnd.dvb.ipdcesgpdd +# application/vnd.dvb.ipdcroaming +# application/vnd.dvb.iptv.alfec-base +# application/vnd.dvb.iptv.alfec-enhancement +# application/vnd.dvb.notif-aggregate-root+xml +# application/vnd.dvb.notif-container+xml +# application/vnd.dvb.notif-generic+xml +# application/vnd.dvb.notif-ia-msglist+xml +# application/vnd.dvb.notif-ia-registration-request+xml +# application/vnd.dvb.notif-ia-registration-response+xml +# application/vnd.dvb.notif-init+xml +# application/vnd.dvb.pfr +application/vnd.dvb.service svc +# application/vnd.dxr +application/vnd.dynageo geo +# application/vnd.dzr +# application/vnd.easykaraoke.cdgdownload +# application/vnd.ecdis-update +application/vnd.ecowin.chart mag +# application/vnd.ecowin.filerequest +# application/vnd.ecowin.fileupdate +# application/vnd.ecowin.series +# application/vnd.ecowin.seriesrequest +# application/vnd.ecowin.seriesupdate +# application/vnd.emclient.accessrequest+xml +application/vnd.enliven nml +# application/vnd.enphase.envoy +# application/vnd.eprints.data+xml +application/vnd.epson.esf esf +application/vnd.epson.msf msf +application/vnd.epson.quickanime qam +application/vnd.epson.salt slt +application/vnd.epson.ssf ssf +# application/vnd.ericsson.quickcall +application/vnd.eszigno3+xml es3 et3 +# application/vnd.etsi.aoc+xml +# application/vnd.etsi.asic-e+zip +# application/vnd.etsi.asic-s+zip +# application/vnd.etsi.cug+xml +# application/vnd.etsi.iptvcommand+xml +# application/vnd.etsi.iptvdiscovery+xml +# application/vnd.etsi.iptvprofile+xml +# application/vnd.etsi.iptvsad-bc+xml +# application/vnd.etsi.iptvsad-cod+xml +# application/vnd.etsi.iptvsad-npvr+xml +# application/vnd.etsi.iptvservice+xml +# application/vnd.etsi.iptvsync+xml +# application/vnd.etsi.iptvueprofile+xml +# application/vnd.etsi.mcid+xml +# application/vnd.etsi.mheg5 +# application/vnd.etsi.overload-control-policy-dataset+xml +# application/vnd.etsi.pstn+xml +# application/vnd.etsi.sci+xml +# application/vnd.etsi.simservs+xml +# application/vnd.etsi.timestamp-token +# application/vnd.etsi.tsl+xml +# application/vnd.etsi.tsl.der +# application/vnd.eudora.data +application/vnd.ezpix-album ez2 +application/vnd.ezpix-package ez3 +# application/vnd.f-secure.mobile +# application/vnd.fastcopy-disk-image +application/vnd.fdf fdf +application/vnd.fdsn.mseed mseed +application/vnd.fdsn.seed seed dataless +# application/vnd.ffsns +# application/vnd.filmit.zfc +# application/vnd.fints +# application/vnd.firemonkeys.cloudcell +application/vnd.flographit gph +application/vnd.fluxtime.clip ftc +# application/vnd.font-fontforge-sfd +application/vnd.framemaker fm frame maker book +application/vnd.frogans.fnc fnc +application/vnd.frogans.ltf ltf +application/vnd.fsc.weblaunch fsc +application/vnd.fujitsu.oasys oas +application/vnd.fujitsu.oasys2 oa2 +application/vnd.fujitsu.oasys3 oa3 +application/vnd.fujitsu.oasysgp fg5 +application/vnd.fujitsu.oasysprs bh2 +# application/vnd.fujixerox.art-ex +# application/vnd.fujixerox.art4 +application/vnd.fujixerox.ddd ddd +application/vnd.fujixerox.docuworks xdw +application/vnd.fujixerox.docuworks.binder xbd +# application/vnd.fujixerox.docuworks.container +# application/vnd.fujixerox.hbpl +# application/vnd.fut-misnet +application/vnd.fuzzysheet fzs +application/vnd.genomatix.tuxedo txd +# application/vnd.geo+json +# application/vnd.geocube+xml +application/vnd.geogebra.file ggb +application/vnd.geogebra.tool ggt +application/vnd.geometry-explorer gex gre +application/vnd.geonext gxt +application/vnd.geoplan g2w +application/vnd.geospace g3w +# application/vnd.gerber +# application/vnd.globalplatform.card-content-mgt +# application/vnd.globalplatform.card-content-mgt-response +application/vnd.gmx gmx +application/vnd.google-earth.kml+xml kml +application/vnd.google-earth.kmz kmz +# application/vnd.gov.sk.e-form+xml +# application/vnd.gov.sk.e-form+zip +# application/vnd.gov.sk.xmldatacontainer+xml +application/vnd.grafeq gqf gqs +# application/vnd.gridmp +application/vnd.groove-account gac +application/vnd.groove-help ghf +application/vnd.groove-identity-message gim +application/vnd.groove-injector grv +application/vnd.groove-tool-message gtm +application/vnd.groove-tool-template tpl +application/vnd.groove-vcard vcg +# application/vnd.hal+json +application/vnd.hal+xml hal +application/vnd.handheld-entertainment+xml zmm +application/vnd.hbci hbci +# application/vnd.hcl-bireports +# application/vnd.hdt +# application/vnd.heroku+json +application/vnd.hhe.lesson-player les +application/vnd.hp-hpgl hpgl +application/vnd.hp-hpid hpid +application/vnd.hp-hps hps +application/vnd.hp-jlyt jlt +application/vnd.hp-pcl pcl +application/vnd.hp-pclxl pclxl +# application/vnd.httphone +application/vnd.hydrostatix.sof-data sfd-hdstx +# application/vnd.hyperdrive+json +# application/vnd.hzn-3d-crossword +# application/vnd.ibm.afplinedata +# application/vnd.ibm.electronic-media +application/vnd.ibm.minipay mpy +application/vnd.ibm.modcap afp listafp list3820 +application/vnd.ibm.rights-management irm +application/vnd.ibm.secure-container sc +application/vnd.iccprofile icc icm +# application/vnd.ieee.1905 +application/vnd.igloader igl +application/vnd.immervision-ivp ivp +application/vnd.immervision-ivu ivu +# application/vnd.ims.imsccv1p1 +# application/vnd.ims.imsccv1p2 +# application/vnd.ims.imsccv1p3 +# application/vnd.ims.lis.v2.result+json +# application/vnd.ims.lti.v2.toolconsumerprofile+json +# application/vnd.ims.lti.v2.toolproxy+json +# application/vnd.ims.lti.v2.toolproxy.id+json +# application/vnd.ims.lti.v2.toolsettings+json +# application/vnd.ims.lti.v2.toolsettings.simple+json +# application/vnd.informedcontrol.rms+xml +# application/vnd.informix-visionary +# application/vnd.infotech.project +# application/vnd.infotech.project+xml +# application/vnd.innopath.wamp.notification +application/vnd.insors.igm igm +application/vnd.intercon.formnet xpw xpx +application/vnd.intergeo i2g +# application/vnd.intertrust.digibox +# application/vnd.intertrust.nncp +application/vnd.intu.qbo qbo +application/vnd.intu.qfx qfx +# application/vnd.iptc.g2.catalogitem+xml +# application/vnd.iptc.g2.conceptitem+xml +# application/vnd.iptc.g2.knowledgeitem+xml +# application/vnd.iptc.g2.newsitem+xml +# application/vnd.iptc.g2.newsmessage+xml +# application/vnd.iptc.g2.packageitem+xml +# application/vnd.iptc.g2.planningitem+xml +application/vnd.ipunplugged.rcprofile rcprofile +application/vnd.irepository.package+xml irp +application/vnd.is-xpr xpr +application/vnd.isac.fcs fcs +application/vnd.jam jam +# application/vnd.japannet-directory-service +# application/vnd.japannet-jpnstore-wakeup +# application/vnd.japannet-payment-wakeup +# application/vnd.japannet-registration +# application/vnd.japannet-registration-wakeup +# application/vnd.japannet-setstore-wakeup +# application/vnd.japannet-verification +# application/vnd.japannet-verification-wakeup +application/vnd.jcp.javame.midlet-rms rms +application/vnd.jisp jisp +application/vnd.joost.joda-archive joda +# application/vnd.jsk.isdn-ngn +application/vnd.kahootz ktz ktr +application/vnd.kde.karbon karbon +application/vnd.kde.kchart chrt +application/vnd.kde.kformula kfo +application/vnd.kde.kivio flw +application/vnd.kde.kontour kon +application/vnd.kde.kpresenter kpr kpt +application/vnd.kde.kspread ksp +application/vnd.kde.kword kwd kwt +application/vnd.kenameaapp htke +application/vnd.kidspiration kia +application/vnd.kinar kne knp +application/vnd.koan skp skd skt skm +application/vnd.kodak-descriptor sse +application/vnd.las.las+xml lasxml +# application/vnd.liberty-request+xml +application/vnd.llamagraphics.life-balance.desktop lbd +application/vnd.llamagraphics.life-balance.exchange+xml lbe +application/vnd.lotus-1-2-3 123 +application/vnd.lotus-approach apr +application/vnd.lotus-freelance pre +application/vnd.lotus-notes nsf +application/vnd.lotus-organizer org +application/vnd.lotus-screencam scm +application/vnd.lotus-wordpro lwp +application/vnd.macports.portpkg portpkg +# application/vnd.mapbox-vector-tile +# application/vnd.marlin.drm.actiontoken+xml +# application/vnd.marlin.drm.conftoken+xml +# application/vnd.marlin.drm.license+xml +# application/vnd.marlin.drm.mdcf +# application/vnd.mason+json +# application/vnd.maxmind.maxmind-db +application/vnd.mcd mcd +application/vnd.medcalcdata mc1 +application/vnd.mediastation.cdkey cdkey +# application/vnd.meridian-slingshot +application/vnd.mfer mwf +application/vnd.mfmp mfm +# application/vnd.micro+json +application/vnd.micrografx.flo flo +application/vnd.micrografx.igx igx +# application/vnd.microsoft.portable-executable +# application/vnd.miele+json +application/vnd.mif mif +# application/vnd.minisoft-hp3000-save +# application/vnd.mitsubishi.misty-guard.trustweb +application/vnd.mobius.daf daf +application/vnd.mobius.dis dis +application/vnd.mobius.mbk mbk +application/vnd.mobius.mqy mqy +application/vnd.mobius.msl msl +application/vnd.mobius.plc plc +application/vnd.mobius.txf txf +application/vnd.mophun.application mpn +application/vnd.mophun.certificate mpc +# application/vnd.motorola.flexsuite +# application/vnd.motorola.flexsuite.adsi +# application/vnd.motorola.flexsuite.fis +# application/vnd.motorola.flexsuite.gotap +# application/vnd.motorola.flexsuite.kmr +# application/vnd.motorola.flexsuite.ttc +# application/vnd.motorola.flexsuite.wem +# application/vnd.motorola.iprm +application/vnd.mozilla.xul+xml xul +# application/vnd.ms-3mfdocument +application/vnd.ms-artgalry cil +# application/vnd.ms-asf +application/vnd.ms-cab-compressed cab +# application/vnd.ms-color.iccprofile +application/vnd.ms-excel xls xlm xla xlc xlt xlw +application/vnd.ms-excel.addin.macroenabled.12 xlam +application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb +application/vnd.ms-excel.sheet.macroenabled.12 xlsm +application/vnd.ms-excel.template.macroenabled.12 xltm +application/vnd.ms-fontobject eot +application/vnd.ms-htmlhelp chm +application/vnd.ms-ims ims +application/vnd.ms-lrm lrm +# application/vnd.ms-office.activex+xml +application/vnd.ms-officetheme thmx +# application/vnd.ms-opentype +# application/vnd.ms-package.obfuscated-opentype +application/vnd.ms-pki.seccat cat +application/vnd.ms-pki.stl stl +# application/vnd.ms-playready.initiator+xml +application/vnd.ms-powerpoint ppt pps pot +application/vnd.ms-powerpoint.addin.macroenabled.12 ppam +application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm +application/vnd.ms-powerpoint.slide.macroenabled.12 sldm +application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm +application/vnd.ms-powerpoint.template.macroenabled.12 potm +# application/vnd.ms-printdevicecapabilities+xml +# application/vnd.ms-printing.printticket+xml +# application/vnd.ms-printschematicket+xml +application/vnd.ms-project mpp mpt +# application/vnd.ms-tnef +# application/vnd.ms-windows.devicepairing +# application/vnd.ms-windows.nwprinting.oob +# application/vnd.ms-windows.printerpairing +# application/vnd.ms-windows.wsd.oob +# application/vnd.ms-wmdrm.lic-chlg-req +# application/vnd.ms-wmdrm.lic-resp +# application/vnd.ms-wmdrm.meter-chlg-req +# application/vnd.ms-wmdrm.meter-resp +application/vnd.ms-word.document.macroenabled.12 docm +application/vnd.ms-word.template.macroenabled.12 dotm +application/vnd.ms-works wps wks wcm wdb +application/vnd.ms-wpl wpl +application/vnd.ms-xpsdocument xps +# application/vnd.msa-disk-image +application/vnd.mseq mseq +# application/vnd.msign +# application/vnd.multiad.creator +# application/vnd.multiad.creator.cif +# application/vnd.music-niff +application/vnd.musician mus +application/vnd.muvee.style msty +application/vnd.mynfc taglet +# application/vnd.ncd.control +# application/vnd.ncd.reference +# application/vnd.nervana +# application/vnd.netfpx +application/vnd.neurolanguage.nlu nlu +# application/vnd.nintendo.nitro.rom +# application/vnd.nintendo.snes.rom +application/vnd.nitf ntf nitf +application/vnd.noblenet-directory nnd +application/vnd.noblenet-sealer nns +application/vnd.noblenet-web nnw +# application/vnd.nokia.catalogs +# application/vnd.nokia.conml+wbxml +# application/vnd.nokia.conml+xml +# application/vnd.nokia.iptv.config+xml +# application/vnd.nokia.isds-radio-presets +# application/vnd.nokia.landmark+wbxml +# application/vnd.nokia.landmark+xml +# application/vnd.nokia.landmarkcollection+xml +# application/vnd.nokia.n-gage.ac+xml +application/vnd.nokia.n-gage.data ngdat +application/vnd.nokia.n-gage.symbian.install n-gage +# application/vnd.nokia.ncd +# application/vnd.nokia.pcd+wbxml +# application/vnd.nokia.pcd+xml +application/vnd.nokia.radio-preset rpst +application/vnd.nokia.radio-presets rpss +application/vnd.novadigm.edm edm +application/vnd.novadigm.edx edx +application/vnd.novadigm.ext ext +# application/vnd.ntt-local.content-share +# application/vnd.ntt-local.file-transfer +# application/vnd.ntt-local.ogw_remote-access +# application/vnd.ntt-local.sip-ta_remote +# application/vnd.ntt-local.sip-ta_tcp_stream +application/vnd.oasis.opendocument.chart odc +application/vnd.oasis.opendocument.chart-template otc +application/vnd.oasis.opendocument.database odb +application/vnd.oasis.opendocument.formula odf +application/vnd.oasis.opendocument.formula-template odft +application/vnd.oasis.opendocument.graphics odg +application/vnd.oasis.opendocument.graphics-template otg +application/vnd.oasis.opendocument.image odi +application/vnd.oasis.opendocument.image-template oti +application/vnd.oasis.opendocument.presentation odp +application/vnd.oasis.opendocument.presentation-template otp +application/vnd.oasis.opendocument.spreadsheet ods +application/vnd.oasis.opendocument.spreadsheet-template ots +application/vnd.oasis.opendocument.text odt +application/vnd.oasis.opendocument.text-master odm +application/vnd.oasis.opendocument.text-template ott +application/vnd.oasis.opendocument.text-web oth +# application/vnd.obn +# application/vnd.oftn.l10n+json +# application/vnd.oipf.contentaccessdownload+xml +# application/vnd.oipf.contentaccessstreaming+xml +# application/vnd.oipf.cspg-hexbinary +# application/vnd.oipf.dae.svg+xml +# application/vnd.oipf.dae.xhtml+xml +# application/vnd.oipf.mippvcontrolmessage+xml +# application/vnd.oipf.pae.gem +# application/vnd.oipf.spdiscovery+xml +# application/vnd.oipf.spdlist+xml +# application/vnd.oipf.ueprofile+xml +# application/vnd.oipf.userprofile+xml +application/vnd.olpc-sugar xo +# application/vnd.oma-scws-config +# application/vnd.oma-scws-http-request +# application/vnd.oma-scws-http-response +# application/vnd.oma.bcast.associated-procedure-parameter+xml +# application/vnd.oma.bcast.drm-trigger+xml +# application/vnd.oma.bcast.imd+xml +# application/vnd.oma.bcast.ltkm +# application/vnd.oma.bcast.notification+xml +# application/vnd.oma.bcast.provisioningtrigger +# application/vnd.oma.bcast.sgboot +# application/vnd.oma.bcast.sgdd+xml +# application/vnd.oma.bcast.sgdu +# application/vnd.oma.bcast.simple-symbol-container +# application/vnd.oma.bcast.smartcard-trigger+xml +# application/vnd.oma.bcast.sprov+xml +# application/vnd.oma.bcast.stkm +# application/vnd.oma.cab-address-book+xml +# application/vnd.oma.cab-feature-handler+xml +# application/vnd.oma.cab-pcc+xml +# application/vnd.oma.cab-subs-invite+xml +# application/vnd.oma.cab-user-prefs+xml +# application/vnd.oma.dcd +# application/vnd.oma.dcdc +application/vnd.oma.dd2+xml dd2 +# application/vnd.oma.drm.risd+xml +# application/vnd.oma.group-usage-list+xml +# application/vnd.oma.lwm2m+json +# application/vnd.oma.lwm2m+tlv +# application/vnd.oma.pal+xml +# application/vnd.oma.poc.detailed-progress-report+xml +# application/vnd.oma.poc.final-report+xml +# application/vnd.oma.poc.groups+xml +# application/vnd.oma.poc.invocation-descriptor+xml +# application/vnd.oma.poc.optimized-progress-report+xml +# application/vnd.oma.push +# application/vnd.oma.scidm.messages+xml +# application/vnd.oma.xcap-directory+xml +# application/vnd.omads-email+xml +# application/vnd.omads-file+xml +# application/vnd.omads-folder+xml +# application/vnd.omaloc-supl-init +# application/vnd.onepager +# application/vnd.openblox.game+xml +# application/vnd.openblox.game-binary +# application/vnd.openeye.oeb +application/vnd.openofficeorg.extension oxt +# application/vnd.openxmlformats-officedocument.custom-properties+xml +# application/vnd.openxmlformats-officedocument.customxmlproperties+xml +# application/vnd.openxmlformats-officedocument.drawing+xml +# application/vnd.openxmlformats-officedocument.drawingml.chart+xml +# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml +# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml +# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml +# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml +# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml +# application/vnd.openxmlformats-officedocument.extended-properties+xml +# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml +# application/vnd.openxmlformats-officedocument.presentationml.comments+xml +# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml +# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml +# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml +application/vnd.openxmlformats-officedocument.presentationml.presentation pptx +# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml +# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml +application/vnd.openxmlformats-officedocument.presentationml.slide sldx +# application/vnd.openxmlformats-officedocument.presentationml.slide+xml +# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml +# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml +application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx +# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml +# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml +# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml +# application/vnd.openxmlformats-officedocument.presentationml.tags+xml +application/vnd.openxmlformats-officedocument.presentationml.template potx +# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml +# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx +# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx +# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml +# application/vnd.openxmlformats-officedocument.theme+xml +# application/vnd.openxmlformats-officedocument.themeoverride+xml +# application/vnd.openxmlformats-officedocument.vmldrawing +# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.document docx +# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx +# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml +# application/vnd.openxmlformats-package.core-properties+xml +# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml +# application/vnd.openxmlformats-package.relationships+xml +# application/vnd.oracle.resource+json +# application/vnd.orange.indata +# application/vnd.osa.netdeploy +application/vnd.osgeo.mapguide.package mgp +# application/vnd.osgi.bundle +application/vnd.osgi.dp dp +application/vnd.osgi.subsystem esa +# application/vnd.otps.ct-kip+xml +# application/vnd.oxli.countgraph +# application/vnd.pagerduty+json +application/vnd.palm pdb pqa oprc +# application/vnd.panoply +# application/vnd.paos.xml +application/vnd.pawaafile paw +# application/vnd.pcos +application/vnd.pg.format str +application/vnd.pg.osasli ei6 +# application/vnd.piaccess.application-licence +application/vnd.picsel efif +application/vnd.pmi.widget wg +# application/vnd.poc.group-advertisement+xml +application/vnd.pocketlearn plf +application/vnd.powerbuilder6 pbd +# application/vnd.powerbuilder6-s +# application/vnd.powerbuilder7 +# application/vnd.powerbuilder7-s +# application/vnd.powerbuilder75 +# application/vnd.powerbuilder75-s +# application/vnd.preminet +application/vnd.previewsystems.box box +application/vnd.proteus.magazine mgz +application/vnd.publishare-delta-tree qps +application/vnd.pvi.ptid1 ptid +# application/vnd.pwg-multiplexed +# application/vnd.pwg-xhtml-print+xml +# application/vnd.qualcomm.brew-app-res +# application/vnd.quarantainenet +application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb +# application/vnd.quobject-quoxdocument +# application/vnd.radisys.moml+xml +# application/vnd.radisys.msml+xml +# application/vnd.radisys.msml-audit+xml +# application/vnd.radisys.msml-audit-conf+xml +# application/vnd.radisys.msml-audit-conn+xml +# application/vnd.radisys.msml-audit-dialog+xml +# application/vnd.radisys.msml-audit-stream+xml +# application/vnd.radisys.msml-conf+xml +# application/vnd.radisys.msml-dialog+xml +# application/vnd.radisys.msml-dialog-base+xml +# application/vnd.radisys.msml-dialog-fax-detect+xml +# application/vnd.radisys.msml-dialog-fax-sendrecv+xml +# application/vnd.radisys.msml-dialog-group+xml +# application/vnd.radisys.msml-dialog-speech+xml +# application/vnd.radisys.msml-dialog-transform+xml +# application/vnd.rainstor.data +# application/vnd.rapid +# application/vnd.rar +application/vnd.realvnc.bed bed +application/vnd.recordare.musicxml mxl +application/vnd.recordare.musicxml+xml musicxml +# application/vnd.renlearn.rlprint +application/vnd.rig.cryptonote cryptonote +application/vnd.rim.cod cod +application/vnd.rn-realmedia rm +application/vnd.rn-realmedia-vbr rmvb +application/vnd.route66.link66+xml link66 +# application/vnd.rs-274x +# application/vnd.ruckus.download +# application/vnd.s3sms +application/vnd.sailingtracker.track st +# application/vnd.sbm.cid +# application/vnd.sbm.mid2 +# application/vnd.scribus +# application/vnd.sealed.3df +# application/vnd.sealed.csf +# application/vnd.sealed.doc +# application/vnd.sealed.eml +# application/vnd.sealed.mht +# application/vnd.sealed.net +# application/vnd.sealed.ppt +# application/vnd.sealed.tiff +# application/vnd.sealed.xls +# application/vnd.sealedmedia.softseal.html +# application/vnd.sealedmedia.softseal.pdf +application/vnd.seemail see +application/vnd.sema sema +application/vnd.semd semd +application/vnd.semf semf +application/vnd.shana.informed.formdata ifm +application/vnd.shana.informed.formtemplate itp +application/vnd.shana.informed.interchange iif +application/vnd.shana.informed.package ipk +application/vnd.simtech-mindmapper twd twds +# application/vnd.siren+json +application/vnd.smaf mmf +# application/vnd.smart.notebook +application/vnd.smart.teacher teacher +# application/vnd.software602.filler.form+xml +# application/vnd.software602.filler.form-xml-zip +application/vnd.solent.sdkm+xml sdkm sdkd +application/vnd.spotfire.dxp dxp +application/vnd.spotfire.sfs sfs +# application/vnd.sss-cod +# application/vnd.sss-dtf +# application/vnd.sss-ntf +application/vnd.stardivision.calc sdc +application/vnd.stardivision.draw sda +application/vnd.stardivision.impress sdd +application/vnd.stardivision.math smf +application/vnd.stardivision.writer sdw vor +application/vnd.stardivision.writer-global sgl +application/vnd.stepmania.package smzip +application/vnd.stepmania.stepchart sm +# application/vnd.street-stream +# application/vnd.sun.wadl+xml +application/vnd.sun.xml.calc sxc +application/vnd.sun.xml.calc.template stc +application/vnd.sun.xml.draw sxd +application/vnd.sun.xml.draw.template std +application/vnd.sun.xml.impress sxi +application/vnd.sun.xml.impress.template sti +application/vnd.sun.xml.math sxm +application/vnd.sun.xml.writer sxw +application/vnd.sun.xml.writer.global sxg +application/vnd.sun.xml.writer.template stw +application/vnd.sus-calendar sus susp +application/vnd.svd svd +# application/vnd.swiftview-ics +application/vnd.symbian.install sis sisx +application/vnd.syncml+xml xsm +application/vnd.syncml.dm+wbxml bdm +application/vnd.syncml.dm+xml xdm +# application/vnd.syncml.dm.notification +# application/vnd.syncml.dmddf+wbxml +# application/vnd.syncml.dmddf+xml +# application/vnd.syncml.dmtnds+wbxml +# application/vnd.syncml.dmtnds+xml +# application/vnd.syncml.ds.notification +application/vnd.tao.intent-module-archive tao +application/vnd.tcpdump.pcap pcap cap dmp +# application/vnd.tmd.mediaflex.api+xml +# application/vnd.tml +application/vnd.tmobile-livetv tmo +application/vnd.trid.tpt tpt +application/vnd.triscape.mxs mxs +application/vnd.trueapp tra +# application/vnd.truedoc +# application/vnd.ubisoft.webplayer +application/vnd.ufdl ufd ufdl +application/vnd.uiq.theme utz +application/vnd.umajin umj +application/vnd.unity unityweb +application/vnd.uoml+xml uoml +# application/vnd.uplanet.alert +# application/vnd.uplanet.alert-wbxml +# application/vnd.uplanet.bearer-choice +# application/vnd.uplanet.bearer-choice-wbxml +# application/vnd.uplanet.cacheop +# application/vnd.uplanet.cacheop-wbxml +# application/vnd.uplanet.channel +# application/vnd.uplanet.channel-wbxml +# application/vnd.uplanet.list +# application/vnd.uplanet.list-wbxml +# application/vnd.uplanet.listcmd +# application/vnd.uplanet.listcmd-wbxml +# application/vnd.uplanet.signal +# application/vnd.uri-map +# application/vnd.valve.source.material +application/vnd.vcx vcx +# application/vnd.vd-study +# application/vnd.vectorworks +# application/vnd.vel+json +# application/vnd.verimatrix.vcas +# application/vnd.vidsoft.vidconference +application/vnd.visio vsd vst vss vsw +application/vnd.visionary vis +# application/vnd.vividence.scriptfile +application/vnd.vsf vsf +# application/vnd.wap.sic +# application/vnd.wap.slc +application/vnd.wap.wbxml wbxml +application/vnd.wap.wmlc wmlc +application/vnd.wap.wmlscriptc wmlsc +application/vnd.webturbo wtb +# application/vnd.wfa.p2p +# application/vnd.wfa.wsc +# application/vnd.windows.devicepairing +# application/vnd.wmc +# application/vnd.wmf.bootstrap +# application/vnd.wolfram.mathematica +# application/vnd.wolfram.mathematica.package +application/vnd.wolfram.player nbp +application/vnd.wordperfect wpd +application/vnd.wqd wqd +# application/vnd.wrq-hp3000-labelled +application/vnd.wt.stf stf +# application/vnd.wv.csp+wbxml +# application/vnd.wv.csp+xml +# application/vnd.wv.ssp+xml +# application/vnd.xacml+json +application/vnd.xara xar +application/vnd.xfdl xfdl +# application/vnd.xfdl.webform +# application/vnd.xmi+xml +# application/vnd.xmpie.cpkg +# application/vnd.xmpie.dpkg +# application/vnd.xmpie.plan +# application/vnd.xmpie.ppkg +# application/vnd.xmpie.xlim +application/vnd.yamaha.hv-dic hvd +application/vnd.yamaha.hv-script hvs +application/vnd.yamaha.hv-voice hvp +application/vnd.yamaha.openscoreformat osf +application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg +# application/vnd.yamaha.remote-setup +application/vnd.yamaha.smaf-audio saf +application/vnd.yamaha.smaf-phrase spf +# application/vnd.yamaha.through-ngn +# application/vnd.yamaha.tunnel-udpencap +# application/vnd.yaoweme +application/vnd.yellowriver-custom-menu cmp +application/vnd.zul zir zirz +application/vnd.zzazz.deck+xml zaz +application/voicexml+xml vxml +# application/vq-rtcpxr +# application/watcherinfo+xml +# application/whoispp-query +# application/whoispp-response +application/widget wgt +application/winhlp hlp +# application/wita +# application/wordperfect5.1 +application/wsdl+xml wsdl +application/wspolicy+xml wspolicy +application/x-7z-compressed 7z +application/x-abiword abw +application/x-ace-compressed ace +# application/x-amf +application/x-apple-diskimage dmg +application/x-authorware-bin aab x32 u32 vox +application/x-authorware-map aam +application/x-authorware-seg aas +application/x-bcpio bcpio +application/x-bittorrent torrent +application/x-blorb blb blorb +application/x-bzip bz +application/x-bzip2 bz2 boz +application/x-cbr cbr cba cbt cbz cb7 +application/x-cdlink vcd +application/x-cfs-compressed cfs +application/x-chat chat +application/x-chess-pgn pgn +# application/x-compress +application/x-conference nsc +application/x-cpio cpio +application/x-csh csh +application/x-debian-package deb udeb +application/x-dgc-compressed dgc +application/x-director dir dcr dxr cst cct cxt w3d fgd swa +application/x-doom wad +application/x-dtbncx+xml ncx +application/x-dtbook+xml dtb +application/x-dtbresource+xml res +application/x-dvi dvi +application/x-envoy evy +application/x-eva eva +application/x-font-bdf bdf +# application/x-font-dos +# application/x-font-framemaker +application/x-font-ghostscript gsf +# application/x-font-libgrx +application/x-font-linux-psf psf +application/x-font-otf otf +application/x-font-pcf pcf +application/x-font-snf snf +# application/x-font-speedo +# application/x-font-sunos-news +application/x-font-ttf ttf ttc +application/x-font-type1 pfa pfb pfm afm +# application/x-font-vfont +application/x-freearc arc +application/x-futuresplash spl +application/x-gca-compressed gca +application/x-glulx ulx +application/x-gnumeric gnumeric +application/x-gramps-xml gramps +application/x-gtar gtar +# application/x-gzip +application/x-hdf hdf +application/x-install-instructions install +application/x-iso9660-image iso +application/x-java-jnlp-file jnlp +application/x-latex latex +application/x-lzh-compressed lzh lha +application/x-mie mie +application/x-mobipocket-ebook prc mobi +application/x-ms-application application +application/x-ms-shortcut lnk +application/x-ms-wmd wmd +application/x-ms-wmz wmz +application/x-ms-xbap xbap +application/x-msaccess mdb +application/x-msbinder obd +application/x-mscardfile crd +application/x-msclip clp +application/x-msdownload exe dll com bat msi +application/x-msmediaview mvb m13 m14 +application/x-msmetafile wmf wmz emf emz +application/x-msmoney mny +application/x-mspublisher pub +application/x-msschedule scd +application/x-msterminal trm +application/x-mswrite wri +application/x-netcdf nc cdf +application/x-nzb nzb +application/x-pkcs12 p12 pfx +application/x-pkcs7-certificates p7b spc +application/x-pkcs7-certreqresp p7r +application/x-rar-compressed rar +application/x-research-info-systems ris +application/x-sh sh +application/x-shar shar +application/x-shockwave-flash swf +application/x-silverlight-app xap +application/x-sql sql +application/x-stuffit sit +application/x-stuffitx sitx +application/x-subrip srt +application/x-sv4cpio sv4cpio +application/x-sv4crc sv4crc +application/x-t3vm-image t3 +application/x-tads gam +application/x-tar tar +application/x-tcl tcl +application/x-tex tex +application/x-tex-tfm tfm +application/x-texinfo texinfo texi +application/x-tgif obj +application/x-ustar ustar +application/x-wais-source src +# application/x-www-form-urlencoded +application/x-x509-ca-cert der crt +application/x-xfig fig +application/x-xliff+xml xlf +application/x-xpinstall xpi +application/x-xz xz +application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8 +# application/x400-bp +# application/xacml+xml +application/xaml+xml xaml +# application/xcap-att+xml +# application/xcap-caps+xml +application/xcap-diff+xml xdf +# application/xcap-el+xml +# application/xcap-error+xml +# application/xcap-ns+xml +# application/xcon-conference-info+xml +# application/xcon-conference-info-diff+xml +application/xenc+xml xenc +application/xhtml+xml xhtml xht +# application/xhtml-voice+xml +application/xml xml xsl +application/xml-dtd dtd +# application/xml-external-parsed-entity +# application/xml-patch+xml +# application/xmpp+xml +application/xop+xml xop +application/xproc+xml xpl +application/xslt+xml xslt +application/xspf+xml xspf +application/xv+xml mxml xhvml xvml xvm +application/yang yang +application/yin+xml yin +application/zip zip +# application/zlib +# audio/1d-interleaved-parityfec +# audio/32kadpcm +# audio/3gpp +# audio/3gpp2 +# audio/ac3 +audio/adpcm adp +# audio/amr +# audio/amr-wb +# audio/amr-wb+ +# audio/aptx +# audio/asc +# audio/atrac-advanced-lossless +# audio/atrac-x +# audio/atrac3 +audio/basic au snd +# audio/bv16 +# audio/bv32 +# audio/clearmode +# audio/cn +# audio/dat12 +# audio/dls +# audio/dsr-es201108 +# audio/dsr-es202050 +# audio/dsr-es202211 +# audio/dsr-es202212 +# audio/dv +# audio/dvi4 +# audio/eac3 +# audio/encaprtp +# audio/evrc +# audio/evrc-qcp +# audio/evrc0 +# audio/evrc1 +# audio/evrcb +# audio/evrcb0 +# audio/evrcb1 +# audio/evrcnw +# audio/evrcnw0 +# audio/evrcnw1 +# audio/evrcwb +# audio/evrcwb0 +# audio/evrcwb1 +# audio/evs +# audio/example +# audio/fwdred +# audio/g711-0 +# audio/g719 +# audio/g722 +# audio/g7221 +# audio/g723 +# audio/g726-16 +# audio/g726-24 +# audio/g726-32 +# audio/g726-40 +# audio/g728 +# audio/g729 +# audio/g7291 +# audio/g729d +# audio/g729e +# audio/gsm +# audio/gsm-efr +# audio/gsm-hr-08 +# audio/ilbc +# audio/ip-mr_v2.5 +# audio/isac +# audio/l16 +# audio/l20 +# audio/l24 +# audio/l8 +# audio/lpc +audio/midi mid midi kar rmi +# audio/mobile-xmf +audio/mp4 m4a mp4a +# audio/mp4a-latm +# audio/mpa +# audio/mpa-robust +audio/mpeg mpga mp2 mp2a mp3 m2a m3a +# audio/mpeg4-generic +# audio/musepack +audio/ogg oga ogg spx +# audio/opus +# audio/parityfec +# audio/pcma +# audio/pcma-wb +# audio/pcmu +# audio/pcmu-wb +# audio/prs.sid +# audio/qcelp +# audio/raptorfec +# audio/red +# audio/rtp-enc-aescm128 +# audio/rtp-midi +# audio/rtploopback +# audio/rtx +audio/s3m s3m +audio/silk sil +# audio/smv +# audio/smv-qcp +# audio/smv0 +# audio/sp-midi +# audio/speex +# audio/t140c +# audio/t38 +# audio/telephone-event +# audio/tone +# audio/uemclip +# audio/ulpfec +# audio/vdvi +# audio/vmr-wb +# audio/vnd.3gpp.iufp +# audio/vnd.4sb +# audio/vnd.audiokoz +# audio/vnd.celp +# audio/vnd.cisco.nse +# audio/vnd.cmles.radio-events +# audio/vnd.cns.anp1 +# audio/vnd.cns.inf1 +audio/vnd.dece.audio uva uvva +audio/vnd.digital-winds eol +# audio/vnd.dlna.adts +# audio/vnd.dolby.heaac.1 +# audio/vnd.dolby.heaac.2 +# audio/vnd.dolby.mlp +# audio/vnd.dolby.mps +# audio/vnd.dolby.pl2 +# audio/vnd.dolby.pl2x +# audio/vnd.dolby.pl2z +# audio/vnd.dolby.pulse.1 +audio/vnd.dra dra +audio/vnd.dts dts +audio/vnd.dts.hd dtshd +# audio/vnd.dvb.file +# audio/vnd.everad.plj +# audio/vnd.hns.audio +audio/vnd.lucent.voice lvp +audio/vnd.ms-playready.media.pya pya +# audio/vnd.nokia.mobile-xmf +# audio/vnd.nortel.vbk +audio/vnd.nuera.ecelp4800 ecelp4800 +audio/vnd.nuera.ecelp7470 ecelp7470 +audio/vnd.nuera.ecelp9600 ecelp9600 +# audio/vnd.octel.sbc +# audio/vnd.qcelp +# audio/vnd.rhetorex.32kadpcm +audio/vnd.rip rip +# audio/vnd.sealedmedia.softseal.mpeg +# audio/vnd.vmx.cvsd +# audio/vorbis +# audio/vorbis-config +audio/webm weba +audio/x-aac aac +audio/x-aiff aif aiff aifc +audio/x-caf caf +audio/x-flac flac +audio/x-matroska mka +audio/x-mpegurl m3u +audio/x-ms-wax wax +audio/x-ms-wma wma +audio/x-pn-realaudio ram ra +audio/x-pn-realaudio-plugin rmp +# audio/x-tta +audio/x-wav wav +audio/xm xm +chemical/x-cdx cdx +chemical/x-cif cif +chemical/x-cmdf cmdf +chemical/x-cml cml +chemical/x-csml csml +# chemical/x-pdb +chemical/x-xyz xyz +image/bmp bmp +image/cgm cgm +# image/dicom-rle +# image/emf +# image/example +# image/fits +image/g3fax g3 +image/gif gif +image/ief ief +# image/jls +# image/jp2 +image/jpeg jpeg jpg jpe +# image/jpm +# image/jpx +image/ktx ktx +# image/naplps +image/png png +image/prs.btif btif +# image/prs.pti +# image/pwg-raster +image/sgi sgi +image/svg+xml svg svgz +# image/t38 +image/tiff tiff tif +# image/tiff-fx +image/vnd.adobe.photoshop psd +# image/vnd.airzip.accelerator.azv +# image/vnd.cns.inf2 +image/vnd.dece.graphic uvi uvvi uvg uvvg +image/vnd.djvu djvu djv +image/vnd.dvb.subtitle sub +image/vnd.dwg dwg +image/vnd.dxf dxf +image/vnd.fastbidsheet fbs +image/vnd.fpx fpx +image/vnd.fst fst +image/vnd.fujixerox.edmics-mmr mmr +image/vnd.fujixerox.edmics-rlc rlc +# image/vnd.globalgraphics.pgb +# image/vnd.microsoft.icon +# image/vnd.mix +# image/vnd.mozilla.apng +image/vnd.ms-modi mdi +image/vnd.ms-photo wdp +image/vnd.net-fpx npx +# image/vnd.radiance +# image/vnd.sealed.png +# image/vnd.sealedmedia.softseal.gif +# image/vnd.sealedmedia.softseal.jpg +# image/vnd.svf +# image/vnd.tencent.tap +# image/vnd.valve.source.texture +image/vnd.wap.wbmp wbmp +image/vnd.xiff xif +# image/vnd.zbrush.pcx +image/webp webp +# image/wmf +image/x-3ds 3ds +image/x-cmu-raster ras +image/x-cmx cmx +image/x-freehand fh fhc fh4 fh5 fh7 +image/x-icon ico +image/x-mrsid-image sid +image/x-pcx pcx +image/x-pict pic pct +image/x-portable-anymap pnm +image/x-portable-bitmap pbm +image/x-portable-graymap pgm +image/x-portable-pixmap ppm +image/x-rgb rgb +image/x-tga tga +image/x-xbitmap xbm +image/x-xpixmap xpm +image/x-xwindowdump xwd +# message/cpim +# message/delivery-status +# message/disposition-notification +# message/example +# message/external-body +# message/feedback-report +# message/global +# message/global-delivery-status +# message/global-disposition-notification +# message/global-headers +# message/http +# message/imdn+xml +# message/news +# message/partial +message/rfc822 eml mime +# message/s-http +# message/sip +# message/sipfrag +# message/tracking-status +# message/vnd.si.simp +# message/vnd.wfa.wsc +# model/example +# model/gltf+json +model/iges igs iges +model/mesh msh mesh silo +model/vnd.collada+xml dae +model/vnd.dwf dwf +# model/vnd.flatland.3dml +model/vnd.gdl gdl +# model/vnd.gs-gdl +# model/vnd.gs.gdl +model/vnd.gtw gtw +# model/vnd.moml+xml +model/vnd.mts mts +# model/vnd.opengex +# model/vnd.parasolid.transmit.binary +# model/vnd.parasolid.transmit.text +# model/vnd.rosette.annotated-data-model +# model/vnd.valve.source.compiled-map +model/vnd.vtu vtu +model/vrml wrl vrml +model/x3d+binary x3db x3dbz +# model/x3d+fastinfoset +model/x3d+vrml x3dv x3dvz +model/x3d+xml x3d x3dz +# model/x3d-vrml +# multipart/alternative +# multipart/appledouble +# multipart/byteranges +# multipart/digest +# multipart/encrypted +# multipart/example +# multipart/form-data +# multipart/header-set +# multipart/mixed +# multipart/parallel +# multipart/related +# multipart/report +# multipart/signed +# multipart/voice-message +# multipart/x-mixed-replace +# text/1d-interleaved-parityfec +text/cache-manifest appcache +text/calendar ics ifb +text/css css +text/csv csv +# text/csv-schema +# text/directory +# text/dns +# text/ecmascript +# text/encaprtp +# text/enriched +# text/example +# text/fwdred +# text/grammar-ref-list +text/html html htm +# text/javascript +# text/jcr-cnd +# text/markdown +# text/mizar +text/n3 n3 +# text/parameters +# text/parityfec +text/plain txt text conf def list log in +# text/provenance-notation +# text/prs.fallenstein.rst +text/prs.lines.tag dsc +# text/prs.prop.logic +# text/raptorfec +# text/red +# text/rfc822-headers +text/richtext rtx +# text/rtf +# text/rtp-enc-aescm128 +# text/rtploopback +# text/rtx +text/sgml sgml sgm +# text/t140 +text/tab-separated-values tsv +text/troff t tr roff man me ms +text/turtle ttl +# text/ulpfec +text/uri-list uri uris urls +text/vcard vcard +# text/vnd.a +# text/vnd.abc +text/vnd.curl curl +text/vnd.curl.dcurl dcurl +text/vnd.curl.mcurl mcurl +text/vnd.curl.scurl scurl +# text/vnd.debian.copyright +# text/vnd.dmclientscript +text/vnd.dvb.subtitle sub +# text/vnd.esmertec.theme-descriptor +text/vnd.fly fly +text/vnd.fmi.flexstor flx +text/vnd.graphviz gv +text/vnd.in3d.3dml 3dml +text/vnd.in3d.spot spot +# text/vnd.iptc.newsml +# text/vnd.iptc.nitf +# text/vnd.latex-z +# text/vnd.motorola.reflex +# text/vnd.ms-mediapackage +# text/vnd.net2phone.commcenter.command +# text/vnd.radisys.msml-basic-layout +# text/vnd.si.uricatalogue +text/vnd.sun.j2me.app-descriptor jad +# text/vnd.trolltech.linguist +# text/vnd.wap.si +# text/vnd.wap.sl +text/vnd.wap.wml wml +text/vnd.wap.wmlscript wmls +text/x-asm s asm +text/x-c c cc cxx cpp h hh dic +text/x-fortran f for f77 f90 +text/x-java-source java +text/x-nfo nfo +text/x-opml opml +text/x-pascal p pas +text/x-setext etx +text/x-sfv sfv +text/x-uuencode uu +text/x-vcalendar vcs +text/x-vcard vcf +# text/xml +# text/xml-external-parsed-entity +# video/1d-interleaved-parityfec +video/3gpp 3gp +# video/3gpp-tt +video/3gpp2 3g2 +# video/bmpeg +# video/bt656 +# video/celb +# video/dv +# video/encaprtp +# video/example +video/h261 h261 +video/h263 h263 +# video/h263-1998 +# video/h263-2000 +video/h264 h264 +# video/h264-rcdo +# video/h264-svc +# video/h265 +# video/iso.segment +video/jpeg jpgv +# video/jpeg2000 +video/jpm jpm jpgm +video/mj2 mj2 mjp2 +# video/mp1s +# video/mp2p +# video/mp2t +video/mp4 mp4 mp4v mpg4 +# video/mp4v-es +video/mpeg mpeg mpg mpe m1v m2v +# video/mpeg4-generic +# video/mpv +# video/nv +video/ogg ogv +# video/parityfec +# video/pointer +video/quicktime qt mov +# video/raptorfec +# video/raw +# video/rtp-enc-aescm128 +# video/rtploopback +# video/rtx +# video/smpte292m +# video/ulpfec +# video/vc1 +# video/vnd.cctv +video/vnd.dece.hd uvh uvvh +video/vnd.dece.mobile uvm uvvm +# video/vnd.dece.mp4 +video/vnd.dece.pd uvp uvvp +video/vnd.dece.sd uvs uvvs +video/vnd.dece.video uvv uvvv +# video/vnd.directv.mpeg +# video/vnd.directv.mpeg-tts +# video/vnd.dlna.mpeg-tts +video/vnd.dvb.file dvb +video/vnd.fvt fvt +# video/vnd.hns.video +# video/vnd.iptvforum.1dparityfec-1010 +# video/vnd.iptvforum.1dparityfec-2005 +# video/vnd.iptvforum.2dparityfec-1010 +# video/vnd.iptvforum.2dparityfec-2005 +# video/vnd.iptvforum.ttsavc +# video/vnd.iptvforum.ttsmpeg2 +# video/vnd.motorola.video +# video/vnd.motorola.videop +video/vnd.mpegurl mxu m4u +video/vnd.ms-playready.media.pyv pyv +# video/vnd.nokia.interleaved-multimedia +# video/vnd.nokia.videovoip +# video/vnd.objectvideo +# video/vnd.radgamettools.bink +# video/vnd.radgamettools.smacker +# video/vnd.sealed.mpeg1 +# video/vnd.sealed.mpeg4 +# video/vnd.sealed.swf +# video/vnd.sealedmedia.softseal.mov +video/vnd.uvvu.mp4 uvu uvvu +video/vnd.vivo viv +# video/vp8 +video/webm webm +video/x-f4v f4v +video/x-fli fli +video/x-flv flv +video/x-m4v m4v +video/x-matroska mkv mk3d mks +video/x-mng mng +video/x-ms-asf asf asx +video/x-ms-vob vob +video/x-ms-wm wm +video/x-ms-wmv wmv +video/x-ms-wmx wmx +video/x-ms-wvx wvx +video/x-msvideo avi +video/x-sgi-movie movie +video/x-smv smv +x-conference/x-cooltalk ice diff --git a/app/data/mime_types.php b/app/data/mime_types.php new file mode 100755 index 000000000..ca1fa524d --- /dev/null +++ b/app/data/mime_types.php @@ -0,0 +1 @@ +array('id'=>1,'t'=>'application/andrew-inset','e'=>array(0=>'ez')),2=>array('id'=>2,'t'=>'application/applixware','e'=>array(0=>'aw')),3=>array('id'=>3,'t'=>'application/atom+xml','e'=>array(0=>'atom')),4=>array('id'=>4,'t'=>'application/atomcat+xml','e'=>array(0=>'atomcat')),5=>array('id'=>5,'t'=>'application/atomsvc+xml','e'=>array(0=>'atomsvc')),6=>array('id'=>6,'t'=>'application/ccxml+xml','e'=>array(0=>'ccxml')),7=>array('id'=>7,'t'=>'application/cdmi-capability','e'=>array(0=>'cdmia')),8=>array('id'=>8,'t'=>'application/cdmi-container','e'=>array(0=>'cdmic')),9=>array('id'=>9,'t'=>'application/cdmi-domain','e'=>array(0=>'cdmid')),10=>array('id'=>10,'t'=>'application/cdmi-object','e'=>array(0=>'cdmio')),11=>array('id'=>11,'t'=>'application/cdmi-queue','e'=>array(0=>'cdmiq')),12=>array('id'=>12,'t'=>'application/cu-seeme','e'=>array(0=>'cu')),13=>array('id'=>13,'t'=>'application/davmount+xml','e'=>array(0=>'davmount')),14=>array('id'=>14,'t'=>'application/docbook+xml','e'=>array(0=>'dbk')),15=>array('id'=>15,'t'=>'application/dssc+der','e'=>array(0=>'dssc')),16=>array('id'=>16,'t'=>'application/dssc+xml','e'=>array(0=>'xdssc')),17=>array('id'=>17,'t'=>'application/ecmascript','e'=>array(0=>'ecma')),18=>array('id'=>18,'t'=>'application/emma+xml','e'=>array(0=>'emma')),19=>array('id'=>19,'t'=>'application/epub+zip','e'=>array(0=>'epub')),20=>array('id'=>20,'t'=>'application/exi','e'=>array(0=>'exi')),21=>array('id'=>21,'t'=>'application/font-tdpfr','e'=>array(0=>'pfr')),22=>array('id'=>22,'t'=>'application/font-woff','e'=>array(0=>'woff')),23=>array('id'=>23,'t'=>'application/gml+xml','e'=>array(0=>'gml')),24=>array('id'=>24,'t'=>'application/gpx+xml','e'=>array(0=>'gpx')),25=>array('id'=>25,'t'=>'application/gxf','e'=>array(0=>'gxf')),26=>array('id'=>26,'t'=>'application/hyperstudio','e'=>array(0=>'stk')),27=>array('id'=>27,'t'=>'application/inkml+xml','e'=>array(0=>'ink',1=>'inkml')),28=>array('id'=>28,'t'=>'application/ipfix','e'=>array(0=>'ipfix')),29=>array('id'=>29,'t'=>'application/java-archive','e'=>array(0=>'jar')),30=>array('id'=>30,'t'=>'application/java-serialized-object','e'=>array(0=>'ser')),31=>array('id'=>31,'t'=>'application/java-vm','e'=>array(0=>'class')),32=>array('id'=>32,'t'=>'application/javascript','e'=>array(0=>'js')),33=>array('id'=>33,'t'=>'application/json','e'=>array(0=>'json')),34=>array('id'=>34,'t'=>'application/jsonml+json','e'=>array(0=>'jsonml')),35=>array('id'=>35,'t'=>'application/lost+xml','e'=>array(0=>'lostxml')),36=>array('id'=>36,'t'=>'application/mac-binhex40','e'=>array(0=>'hqx')),37=>array('id'=>37,'t'=>'application/mac-compactpro','e'=>array(0=>'cpt')),38=>array('id'=>38,'t'=>'application/mads+xml','e'=>array(0=>'mads')),39=>array('id'=>39,'t'=>'application/marc','e'=>array(0=>'mrc')),40=>array('id'=>40,'t'=>'application/marcxml+xml','e'=>array(0=>'mrcx')),41=>array('id'=>41,'t'=>'application/mathematica','e'=>array(0=>'ma',1=>'nb',2=>'mb')),42=>array('id'=>42,'t'=>'application/mathml+xml','e'=>array(0=>'mathml')),43=>array('id'=>43,'t'=>'application/mbox','e'=>array(0=>'mbox')),44=>array('id'=>44,'t'=>'application/mediaservercontrol+xml','e'=>array(0=>'mscml')),45=>array('id'=>45,'t'=>'application/metalink+xml','e'=>array(0=>'metalink')),46=>array('id'=>46,'t'=>'application/metalink4+xml','e'=>array(0=>'meta4')),47=>array('id'=>47,'t'=>'application/mets+xml','e'=>array(0=>'mets')),48=>array('id'=>48,'t'=>'application/mods+xml','e'=>array(0=>'mods')),49=>array('id'=>49,'t'=>'application/mp21','e'=>array(0=>'m21',1=>'mp21')),50=>array('id'=>50,'t'=>'application/mp4','e'=>array(0=>'mp4s')),51=>array('id'=>51,'t'=>'application/msword','e'=>array(0=>'doc',1=>'dot')),52=>array('id'=>52,'t'=>'application/mxf','e'=>array(0=>'mxf')),53=>array('id'=>53,'t'=>'application/octet-stream','e'=>array(0=>'bin',1=>'dms',2=>'lrf',3=>'mar',4=>'so',5=>'dist',6=>'distz',7=>'pkg',8=>'bpk',9=>'dump',10=>'elc',11=>'deploy')),54=>array('id'=>54,'t'=>'application/oda','e'=>array(0=>'oda')),55=>array('id'=>55,'t'=>'application/oebps-package+xml','e'=>array(0=>'opf')),56=>array('id'=>56,'t'=>'application/ogg','e'=>array(0=>'ogx')),57=>array('id'=>57,'t'=>'application/omdoc+xml','e'=>array(0=>'omdoc')),58=>array('id'=>58,'t'=>'application/onenote','e'=>array(0=>'onetoc',1=>'onetoc2',2=>'onetmp',3=>'onepkg')),59=>array('id'=>59,'t'=>'application/oxps','e'=>array(0=>'oxps')),60=>array('id'=>60,'t'=>'application/patch-ops-error+xml','e'=>array(0=>'xer')),61=>array('id'=>61,'t'=>'application/pdf','e'=>array(0=>'pdf')),62=>array('id'=>62,'t'=>'application/pgp-encrypted','e'=>array(0=>'pgp')),63=>array('id'=>63,'t'=>'application/pgp-signature','e'=>array(0=>'asc',1=>'sig')),64=>array('id'=>64,'t'=>'application/pics-rules','e'=>array(0=>'prf')),65=>array('id'=>65,'t'=>'application/pkcs10','e'=>array(0=>'p10')),66=>array('id'=>66,'t'=>'application/pkcs7-mime','e'=>array(0=>'p7m',1=>'p7c')),67=>array('id'=>67,'t'=>'application/pkcs7-signature','e'=>array(0=>'p7s')),68=>array('id'=>68,'t'=>'application/pkcs8','e'=>array(0=>'p8')),69=>array('id'=>69,'t'=>'application/pkix-attr-cert','e'=>array(0=>'ac')),70=>array('id'=>70,'t'=>'application/pkix-cert','e'=>array(0=>'cer')),71=>array('id'=>71,'t'=>'application/pkix-crl','e'=>array(0=>'crl')),72=>array('id'=>72,'t'=>'application/pkix-pkipath','e'=>array(0=>'pkipath')),73=>array('id'=>73,'t'=>'application/pkixcmp','e'=>array(0=>'pki')),74=>array('id'=>74,'t'=>'application/pls+xml','e'=>array(0=>'pls')),75=>array('id'=>75,'t'=>'application/postscript','e'=>array(0=>'ai',1=>'eps',2=>'ps')),76=>array('id'=>76,'t'=>'application/prs.cww','e'=>array(0=>'cww')),77=>array('id'=>77,'t'=>'application/pskc+xml','e'=>array(0=>'pskcxml')),78=>array('id'=>78,'t'=>'application/rdf+xml','e'=>array(0=>'rdf')),79=>array('id'=>79,'t'=>'application/reginfo+xml','e'=>array(0=>'rif')),80=>array('id'=>80,'t'=>'application/relax-ng-compact-syntax','e'=>array(0=>'rnc')),81=>array('id'=>81,'t'=>'application/resource-lists+xml','e'=>array(0=>'rl')),82=>array('id'=>82,'t'=>'application/resource-lists-diff+xml','e'=>array(0=>'rld')),83=>array('id'=>83,'t'=>'application/rls-services+xml','e'=>array(0=>'rs')),84=>array('id'=>84,'t'=>'application/rpki-ghostbusters','e'=>array(0=>'gbr')),85=>array('id'=>85,'t'=>'application/rpki-manifest','e'=>array(0=>'mft')),86=>array('id'=>86,'t'=>'application/rpki-roa','e'=>array(0=>'roa')),87=>array('id'=>87,'t'=>'application/rsd+xml','e'=>array(0=>'rsd')),88=>array('id'=>88,'t'=>'application/rss+xml','e'=>array(0=>'rss')),89=>array('id'=>89,'t'=>'application/rtf','e'=>array(0=>'rtf')),90=>array('id'=>90,'t'=>'application/sbml+xml','e'=>array(0=>'sbml')),91=>array('id'=>91,'t'=>'application/scvp-cv-request','e'=>array(0=>'scq')),92=>array('id'=>92,'t'=>'application/scvp-cv-response','e'=>array(0=>'scs')),93=>array('id'=>93,'t'=>'application/scvp-vp-request','e'=>array(0=>'spq')),94=>array('id'=>94,'t'=>'application/scvp-vp-response','e'=>array(0=>'spp')),95=>array('id'=>95,'t'=>'application/sdp','e'=>array(0=>'sdp')),96=>array('id'=>96,'t'=>'application/set-payment-initiation','e'=>array(0=>'setpay')),97=>array('id'=>97,'t'=>'application/set-registration-initiation','e'=>array(0=>'setreg')),98=>array('id'=>98,'t'=>'application/shf+xml','e'=>array(0=>'shf')),99=>array('id'=>99,'t'=>'application/smil+xml','e'=>array(0=>'smi',1=>'smil')),100=>array('id'=>100,'t'=>'application/sparql-query','e'=>array(0=>'rq')),101=>array('id'=>101,'t'=>'application/sparql-results+xml','e'=>array(0=>'srx')),102=>array('id'=>102,'t'=>'application/srgs','e'=>array(0=>'gram')),103=>array('id'=>103,'t'=>'application/srgs+xml','e'=>array(0=>'grxml')),104=>array('id'=>104,'t'=>'application/sru+xml','e'=>array(0=>'sru')),105=>array('id'=>105,'t'=>'application/ssdl+xml','e'=>array(0=>'ssdl')),106=>array('id'=>106,'t'=>'application/ssml+xml','e'=>array(0=>'ssml')),107=>array('id'=>107,'t'=>'application/tei+xml','e'=>array(0=>'tei',1=>'teicorpus')),108=>array('id'=>108,'t'=>'application/thraud+xml','e'=>array(0=>'tfi')),109=>array('id'=>109,'t'=>'application/timestamped-data','e'=>array(0=>'tsd')),110=>array('id'=>110,'t'=>'application/vnd.3gpp.pic-bw-large','e'=>array(0=>'plb')),111=>array('id'=>111,'t'=>'application/vnd.3gpp.pic-bw-small','e'=>array(0=>'psb')),112=>array('id'=>112,'t'=>'application/vnd.3gpp.pic-bw-var','e'=>array(0=>'pvb')),113=>array('id'=>113,'t'=>'application/vnd.3gpp2.tcap','e'=>array(0=>'tcap')),114=>array('id'=>114,'t'=>'application/vnd.3m.post-it-notes','e'=>array(0=>'pwn')),115=>array('id'=>115,'t'=>'application/vnd.accpac.simply.aso','e'=>array(0=>'aso')),116=>array('id'=>116,'t'=>'application/vnd.accpac.simply.imp','e'=>array(0=>'imp')),117=>array('id'=>117,'t'=>'application/vnd.acucobol','e'=>array(0=>'acu')),118=>array('id'=>118,'t'=>'application/vnd.acucorp','e'=>array(0=>'atc',1=>'acutc')),119=>array('id'=>119,'t'=>'application/vnd.adobe.air-application-installer-package+zip','e'=>array(0=>'air')),120=>array('id'=>120,'t'=>'application/vnd.adobe.formscentral.fcdt','e'=>array(0=>'fcdt')),121=>array('id'=>121,'t'=>'application/vnd.adobe.fxp','e'=>array(0=>'fxp',1=>'fxpl')),122=>array('id'=>122,'t'=>'application/vnd.adobe.xdp+xml','e'=>array(0=>'xdp')),123=>array('id'=>123,'t'=>'application/vnd.adobe.xfdf','e'=>array(0=>'xfdf')),124=>array('id'=>124,'t'=>'application/vnd.ahead.space','e'=>array(0=>'ahead')),125=>array('id'=>125,'t'=>'application/vnd.airzip.filesecure.azf','e'=>array(0=>'azf')),126=>array('id'=>126,'t'=>'application/vnd.airzip.filesecure.azs','e'=>array(0=>'azs')),127=>array('id'=>127,'t'=>'application/vnd.amazon.ebook','e'=>array(0=>'azw')),128=>array('id'=>128,'t'=>'application/vnd.americandynamics.acc','e'=>array(0=>'acc')),129=>array('id'=>129,'t'=>'application/vnd.amiga.ami','e'=>array(0=>'ami')),130=>array('id'=>130,'t'=>'application/vnd.android.package-archive','e'=>array(0=>'apk')),131=>array('id'=>131,'t'=>'application/vnd.anser-web-certificate-issue-initiation','e'=>array(0=>'cii')),132=>array('id'=>132,'t'=>'application/vnd.anser-web-funds-transfer-initiation','e'=>array(0=>'fti')),133=>array('id'=>133,'t'=>'application/vnd.antix.game-component','e'=>array(0=>'atx')),134=>array('id'=>134,'t'=>'application/vnd.apple.installer+xml','e'=>array(0=>'mpkg')),135=>array('id'=>135,'t'=>'application/vnd.apple.mpegurl','e'=>array(0=>'m3u8')),136=>array('id'=>136,'t'=>'application/vnd.aristanetworks.swi','e'=>array(0=>'swi')),137=>array('id'=>137,'t'=>'application/vnd.astraea-software.iota','e'=>array(0=>'iota')),138=>array('id'=>138,'t'=>'application/vnd.audiograph','e'=>array(0=>'aep')),139=>array('id'=>139,'t'=>'application/vnd.blueice.multipass','e'=>array(0=>'mpm')),140=>array('id'=>140,'t'=>'application/vnd.bmi','e'=>array(0=>'bmi')),141=>array('id'=>141,'t'=>'application/vnd.businessobjects','e'=>array(0=>'rep')),142=>array('id'=>142,'t'=>'application/vnd.chemdraw+xml','e'=>array(0=>'cdxml')),143=>array('id'=>143,'t'=>'application/vnd.chipnuts.karaoke-mmd','e'=>array(0=>'mmd')),144=>array('id'=>144,'t'=>'application/vnd.cinderella','e'=>array(0=>'cdy')),145=>array('id'=>145,'t'=>'application/vnd.claymore','e'=>array(0=>'cla')),146=>array('id'=>146,'t'=>'application/vnd.cloanto.rp9','e'=>array(0=>'rp9')),147=>array('id'=>147,'t'=>'application/vnd.clonk.c4group','e'=>array(0=>'c4g',1=>'c4d',2=>'c4f',3=>'c4p',4=>'c4u')),148=>array('id'=>148,'t'=>'application/vnd.cluetrust.cartomobile-config','e'=>array(0=>'c11amc')),149=>array('id'=>149,'t'=>'application/vnd.cluetrust.cartomobile-config-pkg','e'=>array(0=>'c11amz')),150=>array('id'=>150,'t'=>'application/vnd.commonspace','e'=>array(0=>'csp')),151=>array('id'=>151,'t'=>'application/vnd.contact.cmsg','e'=>array(0=>'cdbcmsg')),152=>array('id'=>152,'t'=>'application/vnd.cosmocaller','e'=>array(0=>'cmc')),153=>array('id'=>153,'t'=>'application/vnd.crick.clicker','e'=>array(0=>'clkx')),154=>array('id'=>154,'t'=>'application/vnd.crick.clicker.keyboard','e'=>array(0=>'clkk')),155=>array('id'=>155,'t'=>'application/vnd.crick.clicker.palette','e'=>array(0=>'clkp')),156=>array('id'=>156,'t'=>'application/vnd.crick.clicker.template','e'=>array(0=>'clkt')),157=>array('id'=>157,'t'=>'application/vnd.crick.clicker.wordbank','e'=>array(0=>'clkw')),158=>array('id'=>158,'t'=>'application/vnd.criticaltools.wbs+xml','e'=>array(0=>'wbs')),159=>array('id'=>159,'t'=>'application/vnd.ctc-posml','e'=>array(0=>'pml')),160=>array('id'=>160,'t'=>'application/vnd.cups-ppd','e'=>array(0=>'ppd')),161=>array('id'=>161,'t'=>'application/vnd.curl.car','e'=>array(0=>'car')),162=>array('id'=>162,'t'=>'application/vnd.curl.pcurl','e'=>array(0=>'pcurl')),163=>array('id'=>163,'t'=>'application/vnd.dart','e'=>array(0=>'dart')),164=>array('id'=>164,'t'=>'application/vnd.data-vision.rdz','e'=>array(0=>'rdz')),165=>array('id'=>165,'t'=>'application/vnd.dece.data','e'=>array(0=>'uvf',1=>'uvvf',2=>'uvd',3=>'uvvd')),166=>array('id'=>166,'t'=>'application/vnd.dece.ttml+xml','e'=>array(0=>'uvt',1=>'uvvt')),167=>array('id'=>167,'t'=>'application/vnd.dece.unspecified','e'=>array(0=>'uvx',1=>'uvvx')),168=>array('id'=>168,'t'=>'application/vnd.dece.zip','e'=>array(0=>'uvz',1=>'uvvz')),169=>array('id'=>169,'t'=>'application/vnd.denovo.fcselayout-link','e'=>array(0=>'fe_launch')),170=>array('id'=>170,'t'=>'application/vnd.dna','e'=>array(0=>'dna')),171=>array('id'=>171,'t'=>'application/vnd.dolby.mlp','e'=>array(0=>'mlp')),172=>array('id'=>172,'t'=>'application/vnd.dpgraph','e'=>array(0=>'dpg')),173=>array('id'=>173,'t'=>'application/vnd.dreamfactory','e'=>array(0=>'dfac')),174=>array('id'=>174,'t'=>'application/vnd.ds-keypoint','e'=>array(0=>'kpxx')),175=>array('id'=>175,'t'=>'application/vnd.dvb.ait','e'=>array(0=>'ait')),176=>array('id'=>176,'t'=>'application/vnd.dvb.service','e'=>array(0=>'svc')),177=>array('id'=>177,'t'=>'application/vnd.dynageo','e'=>array(0=>'geo')),178=>array('id'=>178,'t'=>'application/vnd.ecowin.chart','e'=>array(0=>'mag')),179=>array('id'=>179,'t'=>'application/vnd.enliven','e'=>array(0=>'nml')),180=>array('id'=>180,'t'=>'application/vnd.epson.esf','e'=>array(0=>'esf')),181=>array('id'=>181,'t'=>'application/vnd.epson.msf','e'=>array(0=>'msf')),182=>array('id'=>182,'t'=>'application/vnd.epson.quickanime','e'=>array(0=>'qam')),183=>array('id'=>183,'t'=>'application/vnd.epson.salt','e'=>array(0=>'slt')),184=>array('id'=>184,'t'=>'application/vnd.epson.ssf','e'=>array(0=>'ssf')),185=>array('id'=>185,'t'=>'application/vnd.eszigno3+xml','e'=>array(0=>'es3',1=>'et3')),186=>array('id'=>186,'t'=>'application/vnd.ezpix-album','e'=>array(0=>'ez2')),187=>array('id'=>187,'t'=>'application/vnd.ezpix-package','e'=>array(0=>'ez3')),188=>array('id'=>188,'t'=>'application/vnd.fdf','e'=>array(0=>'fdf')),189=>array('id'=>189,'t'=>'application/vnd.fdsn.mseed','e'=>array(0=>'mseed')),190=>array('id'=>190,'t'=>'application/vnd.fdsn.seed','e'=>array(0=>'seed',1=>'dataless')),191=>array('id'=>191,'t'=>'application/vnd.flographit','e'=>array(0=>'gph')),192=>array('id'=>192,'t'=>'application/vnd.fluxtime.clip','e'=>array(0=>'ftc')),193=>array('id'=>193,'t'=>'application/vnd.framemaker','e'=>array(0=>'fm',1=>'frame',2=>'maker',3=>'book')),194=>array('id'=>194,'t'=>'application/vnd.frogans.fnc','e'=>array(0=>'fnc')),195=>array('id'=>195,'t'=>'application/vnd.frogans.ltf','e'=>array(0=>'ltf')),196=>array('id'=>196,'t'=>'application/vnd.fsc.weblaunch','e'=>array(0=>'fsc')),197=>array('id'=>197,'t'=>'application/vnd.fujitsu.oasys','e'=>array(0=>'oas')),198=>array('id'=>198,'t'=>'application/vnd.fujitsu.oasys2','e'=>array(0=>'oa2')),199=>array('id'=>199,'t'=>'application/vnd.fujitsu.oasys3','e'=>array(0=>'oa3')),200=>array('id'=>200,'t'=>'application/vnd.fujitsu.oasysgp','e'=>array(0=>'fg5')),201=>array('id'=>201,'t'=>'application/vnd.fujitsu.oasysprs','e'=>array(0=>'bh2')),202=>array('id'=>202,'t'=>'application/vnd.fujixerox.ddd','e'=>array(0=>'ddd')),203=>array('id'=>203,'t'=>'application/vnd.fujixerox.docuworks','e'=>array(0=>'xdw')),204=>array('id'=>204,'t'=>'application/vnd.fujixerox.docuworks.binder','e'=>array(0=>'xbd')),205=>array('id'=>205,'t'=>'application/vnd.fuzzysheet','e'=>array(0=>'fzs')),206=>array('id'=>206,'t'=>'application/vnd.genomatix.tuxedo','e'=>array(0=>'txd')),207=>array('id'=>207,'t'=>'application/vnd.geogebra.file','e'=>array(0=>'ggb')),208=>array('id'=>208,'t'=>'application/vnd.geogebra.tool','e'=>array(0=>'ggt')),209=>array('id'=>209,'t'=>'application/vnd.geometry-explorer','e'=>array(0=>'gex',1=>'gre')),210=>array('id'=>210,'t'=>'application/vnd.geonext','e'=>array(0=>'gxt')),211=>array('id'=>211,'t'=>'application/vnd.geoplan','e'=>array(0=>'g2w')),212=>array('id'=>212,'t'=>'application/vnd.geospace','e'=>array(0=>'g3w')),213=>array('id'=>213,'t'=>'application/vnd.gmx','e'=>array(0=>'gmx')),214=>array('id'=>214,'t'=>'application/vnd.google-earth.kml+xml','e'=>array(0=>'kml')),215=>array('id'=>215,'t'=>'application/vnd.google-earth.kmz','e'=>array(0=>'kmz')),216=>array('id'=>216,'t'=>'application/vnd.grafeq','e'=>array(0=>'gqf',1=>'gqs')),217=>array('id'=>217,'t'=>'application/vnd.groove-account','e'=>array(0=>'gac')),218=>array('id'=>218,'t'=>'application/vnd.groove-help','e'=>array(0=>'ghf')),219=>array('id'=>219,'t'=>'application/vnd.groove-identity-message','e'=>array(0=>'gim')),220=>array('id'=>220,'t'=>'application/vnd.groove-injector','e'=>array(0=>'grv')),221=>array('id'=>221,'t'=>'application/vnd.groove-tool-message','e'=>array(0=>'gtm')),222=>array('id'=>222,'t'=>'application/vnd.groove-tool-template','e'=>array(0=>'tpl')),223=>array('id'=>223,'t'=>'application/vnd.groove-vcard','e'=>array(0=>'vcg')),224=>array('id'=>224,'t'=>'application/vnd.hal+xml','e'=>array(0=>'hal')),225=>array('id'=>225,'t'=>'application/vnd.handheld-entertainment+xml','e'=>array(0=>'zmm')),226=>array('id'=>226,'t'=>'application/vnd.hbci','e'=>array(0=>'hbci')),227=>array('id'=>227,'t'=>'application/vnd.hhe.lesson-player','e'=>array(0=>'les')),228=>array('id'=>228,'t'=>'application/vnd.hp-hpgl','e'=>array(0=>'hpgl')),229=>array('id'=>229,'t'=>'application/vnd.hp-hpid','e'=>array(0=>'hpid')),230=>array('id'=>230,'t'=>'application/vnd.hp-hps','e'=>array(0=>'hps')),231=>array('id'=>231,'t'=>'application/vnd.hp-jlyt','e'=>array(0=>'jlt')),232=>array('id'=>232,'t'=>'application/vnd.hp-pcl','e'=>array(0=>'pcl')),233=>array('id'=>233,'t'=>'application/vnd.hp-pclxl','e'=>array(0=>'pclxl')),234=>array('id'=>234,'t'=>'application/vnd.hydrostatix.sof-data','e'=>array(0=>'sfd-hdstx')),235=>array('id'=>235,'t'=>'application/vnd.ibm.minipay','e'=>array(0=>'mpy')),236=>array('id'=>236,'t'=>'application/vnd.ibm.modcap','e'=>array(0=>'afp',1=>'listafp',2=>'list3820')),237=>array('id'=>237,'t'=>'application/vnd.ibm.rights-management','e'=>array(0=>'irm')),238=>array('id'=>238,'t'=>'application/vnd.ibm.secure-container','e'=>array(0=>'sc')),239=>array('id'=>239,'t'=>'application/vnd.iccprofile','e'=>array(0=>'icc',1=>'icm')),240=>array('id'=>240,'t'=>'application/vnd.igloader','e'=>array(0=>'igl')),241=>array('id'=>241,'t'=>'application/vnd.immervision-ivp','e'=>array(0=>'ivp')),242=>array('id'=>242,'t'=>'application/vnd.immervision-ivu','e'=>array(0=>'ivu')),243=>array('id'=>243,'t'=>'application/vnd.insors.igm','e'=>array(0=>'igm')),244=>array('id'=>244,'t'=>'application/vnd.intercon.formnet','e'=>array(0=>'xpw',1=>'xpx')),245=>array('id'=>245,'t'=>'application/vnd.intergeo','e'=>array(0=>'i2g')),246=>array('id'=>246,'t'=>'application/vnd.intu.qbo','e'=>array(0=>'qbo')),247=>array('id'=>247,'t'=>'application/vnd.intu.qfx','e'=>array(0=>'qfx')),248=>array('id'=>248,'t'=>'application/vnd.ipunplugged.rcprofile','e'=>array(0=>'rcprofile')),249=>array('id'=>249,'t'=>'application/vnd.irepository.package+xml','e'=>array(0=>'irp')),250=>array('id'=>250,'t'=>'application/vnd.is-xpr','e'=>array(0=>'xpr')),251=>array('id'=>251,'t'=>'application/vnd.isac.fcs','e'=>array(0=>'fcs')),252=>array('id'=>252,'t'=>'application/vnd.jam','e'=>array(0=>'jam')),253=>array('id'=>253,'t'=>'application/vnd.jcp.javame.midlet-rms','e'=>array(0=>'rms')),254=>array('id'=>254,'t'=>'application/vnd.jisp','e'=>array(0=>'jisp')),255=>array('id'=>255,'t'=>'application/vnd.joost.joda-archive','e'=>array(0=>'joda')),256=>array('id'=>256,'t'=>'application/vnd.kahootz','e'=>array(0=>'ktz',1=>'ktr')),257=>array('id'=>257,'t'=>'application/vnd.kde.karbon','e'=>array(0=>'karbon')),258=>array('id'=>258,'t'=>'application/vnd.kde.kchart','e'=>array(0=>'chrt')),259=>array('id'=>259,'t'=>'application/vnd.kde.kformula','e'=>array(0=>'kfo')),260=>array('id'=>260,'t'=>'application/vnd.kde.kivio','e'=>array(0=>'flw')),261=>array('id'=>261,'t'=>'application/vnd.kde.kontour','e'=>array(0=>'kon')),262=>array('id'=>262,'t'=>'application/vnd.kde.kpresenter','e'=>array(0=>'kpr',1=>'kpt')),263=>array('id'=>263,'t'=>'application/vnd.kde.kspread','e'=>array(0=>'ksp')),264=>array('id'=>264,'t'=>'application/vnd.kde.kword','e'=>array(0=>'kwd',1=>'kwt')),265=>array('id'=>265,'t'=>'application/vnd.kenameaapp','e'=>array(0=>'htke')),266=>array('id'=>266,'t'=>'application/vnd.kidspiration','e'=>array(0=>'kia')),267=>array('id'=>267,'t'=>'application/vnd.kinar','e'=>array(0=>'kne',1=>'knp')),268=>array('id'=>268,'t'=>'application/vnd.koan','e'=>array(0=>'skp',1=>'skd',2=>'skt',3=>'skm')),269=>array('id'=>269,'t'=>'application/vnd.kodak-descriptor','e'=>array(0=>'sse')),270=>array('id'=>270,'t'=>'application/vnd.las.las+xml','e'=>array(0=>'lasxml')),271=>array('id'=>271,'t'=>'application/vnd.llamagraphics.life-balance.desktop','e'=>array(0=>'lbd')),272=>array('id'=>272,'t'=>'application/vnd.llamagraphics.life-balance.exchange+xml','e'=>array(0=>'lbe')),273=>array('id'=>273,'t'=>'application/vnd.lotus-1-2-3','e'=>array(0=>'123')),274=>array('id'=>274,'t'=>'application/vnd.lotus-approach','e'=>array(0=>'apr')),275=>array('id'=>275,'t'=>'application/vnd.lotus-freelance','e'=>array(0=>'pre')),276=>array('id'=>276,'t'=>'application/vnd.lotus-notes','e'=>array(0=>'nsf')),277=>array('id'=>277,'t'=>'application/vnd.lotus-organizer','e'=>array(0=>'org')),278=>array('id'=>278,'t'=>'application/vnd.lotus-screencam','e'=>array(0=>'scm')),279=>array('id'=>279,'t'=>'application/vnd.lotus-wordpro','e'=>array(0=>'lwp')),280=>array('id'=>280,'t'=>'application/vnd.macports.portpkg','e'=>array(0=>'portpkg')),281=>array('id'=>281,'t'=>'application/vnd.mcd','e'=>array(0=>'mcd')),282=>array('id'=>282,'t'=>'application/vnd.medcalcdata','e'=>array(0=>'mc1')),283=>array('id'=>283,'t'=>'application/vnd.mediastation.cdkey','e'=>array(0=>'cdkey')),284=>array('id'=>284,'t'=>'application/vnd.mfer','e'=>array(0=>'mwf')),285=>array('id'=>285,'t'=>'application/vnd.mfmp','e'=>array(0=>'mfm')),286=>array('id'=>286,'t'=>'application/vnd.micrografx.flo','e'=>array(0=>'flo')),287=>array('id'=>287,'t'=>'application/vnd.micrografx.igx','e'=>array(0=>'igx')),288=>array('id'=>288,'t'=>'application/vnd.mif','e'=>array(0=>'mif')),289=>array('id'=>289,'t'=>'application/vnd.mobius.daf','e'=>array(0=>'daf')),290=>array('id'=>290,'t'=>'application/vnd.mobius.dis','e'=>array(0=>'dis')),291=>array('id'=>291,'t'=>'application/vnd.mobius.mbk','e'=>array(0=>'mbk')),292=>array('id'=>292,'t'=>'application/vnd.mobius.mqy','e'=>array(0=>'mqy')),293=>array('id'=>293,'t'=>'application/vnd.mobius.msl','e'=>array(0=>'msl')),294=>array('id'=>294,'t'=>'application/vnd.mobius.plc','e'=>array(0=>'plc')),295=>array('id'=>295,'t'=>'application/vnd.mobius.txf','e'=>array(0=>'txf')),296=>array('id'=>296,'t'=>'application/vnd.mophun.application','e'=>array(0=>'mpn')),297=>array('id'=>297,'t'=>'application/vnd.mophun.certificate','e'=>array(0=>'mpc')),298=>array('id'=>298,'t'=>'application/vnd.mozilla.xul+xml','e'=>array(0=>'xul')),299=>array('id'=>299,'t'=>'application/vnd.ms-artgalry','e'=>array(0=>'cil')),300=>array('id'=>300,'t'=>'application/vnd.ms-cab-compressed','e'=>array(0=>'cab')),301=>array('id'=>301,'t'=>'application/vnd.ms-excel','e'=>array(0=>'xls',1=>'xlm',2=>'xla',3=>'xlc',4=>'xlt',5=>'xlw')),302=>array('id'=>302,'t'=>'application/vnd.ms-excel.addin.macroenabled.12','e'=>array(0=>'xlam')),303=>array('id'=>303,'t'=>'application/vnd.ms-excel.sheet.binary.macroenabled.12','e'=>array(0=>'xlsb')),304=>array('id'=>304,'t'=>'application/vnd.ms-excel.sheet.macroenabled.12','e'=>array(0=>'xlsm')),305=>array('id'=>305,'t'=>'application/vnd.ms-excel.template.macroenabled.12','e'=>array(0=>'xltm')),306=>array('id'=>306,'t'=>'application/vnd.ms-fontobject','e'=>array(0=>'eot')),307=>array('id'=>307,'t'=>'application/vnd.ms-htmlhelp','e'=>array(0=>'chm')),308=>array('id'=>308,'t'=>'application/vnd.ms-ims','e'=>array(0=>'ims')),309=>array('id'=>309,'t'=>'application/vnd.ms-lrm','e'=>array(0=>'lrm')),310=>array('id'=>310,'t'=>'application/vnd.ms-officetheme','e'=>array(0=>'thmx')),311=>array('id'=>311,'t'=>'application/vnd.ms-pki.seccat','e'=>array(0=>'cat')),312=>array('id'=>312,'t'=>'application/vnd.ms-pki.stl','e'=>array(0=>'stl')),313=>array('id'=>313,'t'=>'application/vnd.ms-powerpoint','e'=>array(0=>'ppt',1=>'pps',2=>'pot')),314=>array('id'=>314,'t'=>'application/vnd.ms-powerpoint.addin.macroenabled.12','e'=>array(0=>'ppam')),315=>array('id'=>315,'t'=>'application/vnd.ms-powerpoint.presentation.macroenabled.12','e'=>array(0=>'pptm')),316=>array('id'=>316,'t'=>'application/vnd.ms-powerpoint.slide.macroenabled.12','e'=>array(0=>'sldm')),317=>array('id'=>317,'t'=>'application/vnd.ms-powerpoint.slideshow.macroenabled.12','e'=>array(0=>'ppsm')),318=>array('id'=>318,'t'=>'application/vnd.ms-powerpoint.template.macroenabled.12','e'=>array(0=>'potm')),319=>array('id'=>319,'t'=>'application/vnd.ms-project','e'=>array(0=>'mpp',1=>'mpt')),320=>array('id'=>320,'t'=>'application/vnd.ms-word.document.macroenabled.12','e'=>array(0=>'docm')),321=>array('id'=>321,'t'=>'application/vnd.ms-word.template.macroenabled.12','e'=>array(0=>'dotm')),322=>array('id'=>322,'t'=>'application/vnd.ms-works','e'=>array(0=>'wps',1=>'wks',2=>'wcm',3=>'wdb')),323=>array('id'=>323,'t'=>'application/vnd.ms-wpl','e'=>array(0=>'wpl')),324=>array('id'=>324,'t'=>'application/vnd.ms-xpsdocument','e'=>array(0=>'xps')),325=>array('id'=>325,'t'=>'application/vnd.mseq','e'=>array(0=>'mseq')),326=>array('id'=>326,'t'=>'application/vnd.musician','e'=>array(0=>'mus')),327=>array('id'=>327,'t'=>'application/vnd.muvee.style','e'=>array(0=>'msty')),328=>array('id'=>328,'t'=>'application/vnd.mynfc','e'=>array(0=>'taglet')),329=>array('id'=>329,'t'=>'application/vnd.neurolanguage.nlu','e'=>array(0=>'nlu')),330=>array('id'=>330,'t'=>'application/vnd.nitf','e'=>array(0=>'ntf',1=>'nitf')),331=>array('id'=>331,'t'=>'application/vnd.noblenet-directory','e'=>array(0=>'nnd')),332=>array('id'=>332,'t'=>'application/vnd.noblenet-sealer','e'=>array(0=>'nns')),333=>array('id'=>333,'t'=>'application/vnd.noblenet-web','e'=>array(0=>'nnw')),334=>array('id'=>334,'t'=>'application/vnd.nokia.n-gage.data','e'=>array(0=>'ngdat')),335=>array('id'=>335,'t'=>'application/vnd.nokia.n-gage.symbian.install','e'=>array(0=>'n-gage')),336=>array('id'=>336,'t'=>'application/vnd.nokia.radio-preset','e'=>array(0=>'rpst')),337=>array('id'=>337,'t'=>'application/vnd.nokia.radio-presets','e'=>array(0=>'rpss')),338=>array('id'=>338,'t'=>'application/vnd.novadigm.edm','e'=>array(0=>'edm')),339=>array('id'=>339,'t'=>'application/vnd.novadigm.edx','e'=>array(0=>'edx')),340=>array('id'=>340,'t'=>'application/vnd.novadigm.ext','e'=>array(0=>'ext')),341=>array('id'=>341,'t'=>'application/vnd.oasis.opendocument.chart','e'=>array(0=>'odc')),342=>array('id'=>342,'t'=>'application/vnd.oasis.opendocument.chart-template','e'=>array(0=>'otc')),343=>array('id'=>343,'t'=>'application/vnd.oasis.opendocument.database','e'=>array(0=>'odb')),344=>array('id'=>344,'t'=>'application/vnd.oasis.opendocument.formula','e'=>array(0=>'odf')),345=>array('id'=>345,'t'=>'application/vnd.oasis.opendocument.formula-template','e'=>array(0=>'odft')),346=>array('id'=>346,'t'=>'application/vnd.oasis.opendocument.graphics','e'=>array(0=>'odg')),347=>array('id'=>347,'t'=>'application/vnd.oasis.opendocument.graphics-template','e'=>array(0=>'otg')),348=>array('id'=>348,'t'=>'application/vnd.oasis.opendocument.image','e'=>array(0=>'odi')),349=>array('id'=>349,'t'=>'application/vnd.oasis.opendocument.image-template','e'=>array(0=>'oti')),350=>array('id'=>350,'t'=>'application/vnd.oasis.opendocument.presentation','e'=>array(0=>'odp')),351=>array('id'=>351,'t'=>'application/vnd.oasis.opendocument.presentation-template','e'=>array(0=>'otp')),352=>array('id'=>352,'t'=>'application/vnd.oasis.opendocument.spreadsheet','e'=>array(0=>'ods')),353=>array('id'=>353,'t'=>'application/vnd.oasis.opendocument.spreadsheet-template','e'=>array(0=>'ots')),354=>array('id'=>354,'t'=>'application/vnd.oasis.opendocument.text','e'=>array(0=>'odt')),355=>array('id'=>355,'t'=>'application/vnd.oasis.opendocument.text-master','e'=>array(0=>'odm')),356=>array('id'=>356,'t'=>'application/vnd.oasis.opendocument.text-template','e'=>array(0=>'ott')),357=>array('id'=>357,'t'=>'application/vnd.oasis.opendocument.text-web','e'=>array(0=>'oth')),358=>array('id'=>358,'t'=>'application/vnd.olpc-sugar','e'=>array(0=>'xo')),359=>array('id'=>359,'t'=>'application/vnd.oma.dd2+xml','e'=>array(0=>'dd2')),360=>array('id'=>360,'t'=>'application/vnd.openofficeorg.extension','e'=>array(0=>'oxt')),361=>array('id'=>361,'t'=>'application/vnd.openxmlformats-officedocument.presentationml.presentation','e'=>array(0=>'pptx')),362=>array('id'=>362,'t'=>'application/vnd.openxmlformats-officedocument.presentationml.slide','e'=>array(0=>'sldx')),363=>array('id'=>363,'t'=>'application/vnd.openxmlformats-officedocument.presentationml.slideshow','e'=>array(0=>'ppsx')),364=>array('id'=>364,'t'=>'application/vnd.openxmlformats-officedocument.presentationml.template','e'=>array(0=>'potx')),365=>array('id'=>365,'t'=>'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','e'=>array(0=>'xlsx')),366=>array('id'=>366,'t'=>'application/vnd.openxmlformats-officedocument.spreadsheetml.template','e'=>array(0=>'xltx')),367=>array('id'=>367,'t'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.document','e'=>array(0=>'docx')),368=>array('id'=>368,'t'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.template','e'=>array(0=>'dotx')),369=>array('id'=>369,'t'=>'application/vnd.osgeo.mapguide.package','e'=>array(0=>'mgp')),370=>array('id'=>370,'t'=>'application/vnd.osgi.dp','e'=>array(0=>'dp')),371=>array('id'=>371,'t'=>'application/vnd.osgi.subsystem','e'=>array(0=>'esa')),372=>array('id'=>372,'t'=>'application/vnd.palm','e'=>array(0=>'pdb',1=>'pqa',2=>'oprc')),373=>array('id'=>373,'t'=>'application/vnd.pawaafile','e'=>array(0=>'paw')),374=>array('id'=>374,'t'=>'application/vnd.pg.format','e'=>array(0=>'str')),375=>array('id'=>375,'t'=>'application/vnd.pg.osasli','e'=>array(0=>'ei6')),376=>array('id'=>376,'t'=>'application/vnd.picsel','e'=>array(0=>'efif')),377=>array('id'=>377,'t'=>'application/vnd.pmi.widget','e'=>array(0=>'wg')),378=>array('id'=>378,'t'=>'application/vnd.pocketlearn','e'=>array(0=>'plf')),379=>array('id'=>379,'t'=>'application/vnd.powerbuilder6','e'=>array(0=>'pbd')),380=>array('id'=>380,'t'=>'application/vnd.previewsystems.box','e'=>array(0=>'box')),381=>array('id'=>381,'t'=>'application/vnd.proteus.magazine','e'=>array(0=>'mgz')),382=>array('id'=>382,'t'=>'application/vnd.publishare-delta-tree','e'=>array(0=>'qps')),383=>array('id'=>383,'t'=>'application/vnd.pvi.ptid1','e'=>array(0=>'ptid')),384=>array('id'=>384,'t'=>'application/vnd.quark.quarkxpress','e'=>array(0=>'qxd',1=>'qxt',2=>'qwd',3=>'qwt',4=>'qxl',5=>'qxb')),385=>array('id'=>385,'t'=>'application/vnd.realvnc.bed','e'=>array(0=>'bed')),386=>array('id'=>386,'t'=>'application/vnd.recordare.musicxml','e'=>array(0=>'mxl')),387=>array('id'=>387,'t'=>'application/vnd.recordare.musicxml+xml','e'=>array(0=>'musicxml')),388=>array('id'=>388,'t'=>'application/vnd.rig.cryptonote','e'=>array(0=>'cryptonote')),389=>array('id'=>389,'t'=>'application/vnd.rim.cod','e'=>array(0=>'cod')),390=>array('id'=>390,'t'=>'application/vnd.rn-realmedia','e'=>array(0=>'rm')),391=>array('id'=>391,'t'=>'application/vnd.rn-realmedia-vbr','e'=>array(0=>'rmvb')),392=>array('id'=>392,'t'=>'application/vnd.route66.link66+xml','e'=>array(0=>'link66')),393=>array('id'=>393,'t'=>'application/vnd.sailingtracker.track','e'=>array(0=>'st')),394=>array('id'=>394,'t'=>'application/vnd.seemail','e'=>array(0=>'see')),395=>array('id'=>395,'t'=>'application/vnd.sema','e'=>array(0=>'sema')),396=>array('id'=>396,'t'=>'application/vnd.semd','e'=>array(0=>'semd')),397=>array('id'=>397,'t'=>'application/vnd.semf','e'=>array(0=>'semf')),398=>array('id'=>398,'t'=>'application/vnd.shana.informed.formdata','e'=>array(0=>'ifm')),399=>array('id'=>399,'t'=>'application/vnd.shana.informed.formtemplate','e'=>array(0=>'itp')),400=>array('id'=>400,'t'=>'application/vnd.shana.informed.interchange','e'=>array(0=>'iif')),401=>array('id'=>401,'t'=>'application/vnd.shana.informed.package','e'=>array(0=>'ipk')),402=>array('id'=>402,'t'=>'application/vnd.simtech-mindmapper','e'=>array(0=>'twd',1=>'twds')),403=>array('id'=>403,'t'=>'application/vnd.smaf','e'=>array(0=>'mmf')),404=>array('id'=>404,'t'=>'application/vnd.smart.teacher','e'=>array(0=>'teacher')),405=>array('id'=>405,'t'=>'application/vnd.solent.sdkm+xml','e'=>array(0=>'sdkm',1=>'sdkd')),406=>array('id'=>406,'t'=>'application/vnd.spotfire.dxp','e'=>array(0=>'dxp')),407=>array('id'=>407,'t'=>'application/vnd.spotfire.sfs','e'=>array(0=>'sfs')),408=>array('id'=>408,'t'=>'application/vnd.stardivision.calc','e'=>array(0=>'sdc')),409=>array('id'=>409,'t'=>'application/vnd.stardivision.draw','e'=>array(0=>'sda')),410=>array('id'=>410,'t'=>'application/vnd.stardivision.impress','e'=>array(0=>'sdd')),411=>array('id'=>411,'t'=>'application/vnd.stardivision.math','e'=>array(0=>'smf')),412=>array('id'=>412,'t'=>'application/vnd.stardivision.writer','e'=>array(0=>'sdw',1=>'vor')),413=>array('id'=>413,'t'=>'application/vnd.stardivision.writer-global','e'=>array(0=>'sgl')),414=>array('id'=>414,'t'=>'application/vnd.stepmania.package','e'=>array(0=>'smzip')),415=>array('id'=>415,'t'=>'application/vnd.stepmania.stepchart','e'=>array(0=>'sm')),416=>array('id'=>416,'t'=>'application/vnd.sun.xml.calc','e'=>array(0=>'sxc')),417=>array('id'=>417,'t'=>'application/vnd.sun.xml.calc.template','e'=>array(0=>'stc')),418=>array('id'=>418,'t'=>'application/vnd.sun.xml.draw','e'=>array(0=>'sxd')),419=>array('id'=>419,'t'=>'application/vnd.sun.xml.draw.template','e'=>array(0=>'std')),420=>array('id'=>420,'t'=>'application/vnd.sun.xml.impress','e'=>array(0=>'sxi')),421=>array('id'=>421,'t'=>'application/vnd.sun.xml.impress.template','e'=>array(0=>'sti')),422=>array('id'=>422,'t'=>'application/vnd.sun.xml.math','e'=>array(0=>'sxm')),423=>array('id'=>423,'t'=>'application/vnd.sun.xml.writer','e'=>array(0=>'sxw')),424=>array('id'=>424,'t'=>'application/vnd.sun.xml.writer.global','e'=>array(0=>'sxg')),425=>array('id'=>425,'t'=>'application/vnd.sun.xml.writer.template','e'=>array(0=>'stw')),426=>array('id'=>426,'t'=>'application/vnd.sus-calendar','e'=>array(0=>'sus',1=>'susp')),427=>array('id'=>427,'t'=>'application/vnd.svd','e'=>array(0=>'svd')),428=>array('id'=>428,'t'=>'application/vnd.symbian.install','e'=>array(0=>'sis',1=>'sisx')),429=>array('id'=>429,'t'=>'application/vnd.syncml+xml','e'=>array(0=>'xsm')),430=>array('id'=>430,'t'=>'application/vnd.syncml.dm+wbxml','e'=>array(0=>'bdm')),431=>array('id'=>431,'t'=>'application/vnd.syncml.dm+xml','e'=>array(0=>'xdm')),432=>array('id'=>432,'t'=>'application/vnd.tao.intent-module-archive','e'=>array(0=>'tao')),433=>array('id'=>433,'t'=>'application/vnd.tcpdump.pcap','e'=>array(0=>'pcap',1=>'cap',2=>'dmp')),434=>array('id'=>434,'t'=>'application/vnd.tmobile-livetv','e'=>array(0=>'tmo')),435=>array('id'=>435,'t'=>'application/vnd.trid.tpt','e'=>array(0=>'tpt')),436=>array('id'=>436,'t'=>'application/vnd.triscape.mxs','e'=>array(0=>'mxs')),437=>array('id'=>437,'t'=>'application/vnd.trueapp','e'=>array(0=>'tra')),438=>array('id'=>438,'t'=>'application/vnd.ufdl','e'=>array(0=>'ufd',1=>'ufdl')),439=>array('id'=>439,'t'=>'application/vnd.uiq.theme','e'=>array(0=>'utz')),440=>array('id'=>440,'t'=>'application/vnd.umajin','e'=>array(0=>'umj')),441=>array('id'=>441,'t'=>'application/vnd.unity','e'=>array(0=>'unityweb')),442=>array('id'=>442,'t'=>'application/vnd.uoml+xml','e'=>array(0=>'uoml')),443=>array('id'=>443,'t'=>'application/vnd.vcx','e'=>array(0=>'vcx')),444=>array('id'=>444,'t'=>'application/vnd.visio','e'=>array(0=>'vsd',1=>'vst',2=>'vss',3=>'vsw')),445=>array('id'=>445,'t'=>'application/vnd.visionary','e'=>array(0=>'vis')),446=>array('id'=>446,'t'=>'application/vnd.vsf','e'=>array(0=>'vsf')),447=>array('id'=>447,'t'=>'application/vnd.wap.wbxml','e'=>array(0=>'wbxml')),448=>array('id'=>448,'t'=>'application/vnd.wap.wmlc','e'=>array(0=>'wmlc')),449=>array('id'=>449,'t'=>'application/vnd.wap.wmlscriptc','e'=>array(0=>'wmlsc')),450=>array('id'=>450,'t'=>'application/vnd.webturbo','e'=>array(0=>'wtb')),451=>array('id'=>451,'t'=>'application/vnd.wolfram.player','e'=>array(0=>'nbp')),452=>array('id'=>452,'t'=>'application/vnd.wordperfect','e'=>array(0=>'wpd')),453=>array('id'=>453,'t'=>'application/vnd.wqd','e'=>array(0=>'wqd')),454=>array('id'=>454,'t'=>'application/vnd.wt.stf','e'=>array(0=>'stf')),455=>array('id'=>455,'t'=>'application/vnd.xara','e'=>array(0=>'xar')),456=>array('id'=>456,'t'=>'application/vnd.xfdl','e'=>array(0=>'xfdl')),457=>array('id'=>457,'t'=>'application/vnd.yamaha.hv-dic','e'=>array(0=>'hvd')),458=>array('id'=>458,'t'=>'application/vnd.yamaha.hv-script','e'=>array(0=>'hvs')),459=>array('id'=>459,'t'=>'application/vnd.yamaha.hv-voice','e'=>array(0=>'hvp')),460=>array('id'=>460,'t'=>'application/vnd.yamaha.openscoreformat','e'=>array(0=>'osf')),461=>array('id'=>461,'t'=>'application/vnd.yamaha.openscoreformat.osfpvg+xml','e'=>array(0=>'osfpvg')),462=>array('id'=>462,'t'=>'application/vnd.yamaha.smaf-audio','e'=>array(0=>'saf')),463=>array('id'=>463,'t'=>'application/vnd.yamaha.smaf-phrase','e'=>array(0=>'spf')),464=>array('id'=>464,'t'=>'application/vnd.yellowriver-custom-menu','e'=>array(0=>'cmp')),465=>array('id'=>465,'t'=>'application/vnd.zul','e'=>array(0=>'zir',1=>'zirz')),466=>array('id'=>466,'t'=>'application/vnd.zzazz.deck+xml','e'=>array(0=>'zaz')),467=>array('id'=>467,'t'=>'application/voicexml+xml','e'=>array(0=>'vxml')),468=>array('id'=>468,'t'=>'application/widget','e'=>array(0=>'wgt')),469=>array('id'=>469,'t'=>'application/winhlp','e'=>array(0=>'hlp')),470=>array('id'=>470,'t'=>'application/wsdl+xml','e'=>array(0=>'wsdl')),471=>array('id'=>471,'t'=>'application/wspolicy+xml','e'=>array(0=>'wspolicy')),472=>array('id'=>472,'t'=>'application/x-7z-compressed','e'=>array(0=>'7z')),473=>array('id'=>473,'t'=>'application/x-abiword','e'=>array(0=>'abw')),474=>array('id'=>474,'t'=>'application/x-ace-compressed','e'=>array(0=>'ace')),475=>array('id'=>475,'t'=>'application/x-apple-diskimage','e'=>array(0=>'dmg')),476=>array('id'=>476,'t'=>'application/x-authorware-bin','e'=>array(0=>'aab',1=>'x32',2=>'u32',3=>'vox')),477=>array('id'=>477,'t'=>'application/x-authorware-map','e'=>array(0=>'aam')),478=>array('id'=>478,'t'=>'application/x-authorware-seg','e'=>array(0=>'aas')),479=>array('id'=>479,'t'=>'application/x-bcpio','e'=>array(0=>'bcpio')),480=>array('id'=>480,'t'=>'application/x-bittorrent','e'=>array(0=>'torrent')),481=>array('id'=>481,'t'=>'application/x-blorb','e'=>array(0=>'blb',1=>'blorb')),482=>array('id'=>482,'t'=>'application/x-bzip','e'=>array(0=>'bz')),483=>array('id'=>483,'t'=>'application/x-bzip2','e'=>array(0=>'bz2',1=>'boz')),484=>array('id'=>484,'t'=>'application/x-cbr','e'=>array(0=>'cbr',1=>'cba',2=>'cbt',3=>'cbz',4=>'cb7')),485=>array('id'=>485,'t'=>'application/x-cdlink','e'=>array(0=>'vcd')),486=>array('id'=>486,'t'=>'application/x-cfs-compressed','e'=>array(0=>'cfs')),487=>array('id'=>487,'t'=>'application/x-chat','e'=>array(0=>'chat')),488=>array('id'=>488,'t'=>'application/x-chess-pgn','e'=>array(0=>'pgn')),489=>array('id'=>489,'t'=>'application/x-conference','e'=>array(0=>'nsc')),490=>array('id'=>490,'t'=>'application/x-cpio','e'=>array(0=>'cpio')),491=>array('id'=>491,'t'=>'application/x-csh','e'=>array(0=>'csh')),492=>array('id'=>492,'t'=>'application/x-debian-package','e'=>array(0=>'deb',1=>'udeb')),493=>array('id'=>493,'t'=>'application/x-dgc-compressed','e'=>array(0=>'dgc')),494=>array('id'=>494,'t'=>'application/x-director','e'=>array(0=>'dir',1=>'dcr',2=>'dxr',3=>'cst',4=>'cct',5=>'cxt',6=>'w3d',7=>'fgd',8=>'swa')),495=>array('id'=>495,'t'=>'application/x-doom','e'=>array(0=>'wad')),496=>array('id'=>496,'t'=>'application/x-dtbncx+xml','e'=>array(0=>'ncx')),497=>array('id'=>497,'t'=>'application/x-dtbook+xml','e'=>array(0=>'dtb')),498=>array('id'=>498,'t'=>'application/x-dtbresource+xml','e'=>array(0=>'res')),499=>array('id'=>499,'t'=>'application/x-dvi','e'=>array(0=>'dvi')),500=>array('id'=>500,'t'=>'application/x-envoy','e'=>array(0=>'evy')),501=>array('id'=>501,'t'=>'application/x-eva','e'=>array(0=>'eva')),502=>array('id'=>502,'t'=>'application/x-font-bdf','e'=>array(0=>'bdf')),503=>array('id'=>503,'t'=>'application/x-font-ghostscript','e'=>array(0=>'gsf')),504=>array('id'=>504,'t'=>'application/x-font-linux-psf','e'=>array(0=>'psf')),505=>array('id'=>505,'t'=>'application/x-font-otf','e'=>array(0=>'otf')),506=>array('id'=>506,'t'=>'application/x-font-pcf','e'=>array(0=>'pcf')),507=>array('id'=>507,'t'=>'application/x-font-snf','e'=>array(0=>'snf')),508=>array('id'=>508,'t'=>'application/x-font-ttf','e'=>array(0=>'ttf',1=>'ttc')),509=>array('id'=>509,'t'=>'application/x-font-type1','e'=>array(0=>'pfa',1=>'pfb',2=>'pfm',3=>'afm')),510=>array('id'=>510,'t'=>'application/x-freearc','e'=>array(0=>'arc')),511=>array('id'=>511,'t'=>'application/x-futuresplash','e'=>array(0=>'spl')),512=>array('id'=>512,'t'=>'application/x-gca-compressed','e'=>array(0=>'gca')),513=>array('id'=>513,'t'=>'application/x-glulx','e'=>array(0=>'ulx')),514=>array('id'=>514,'t'=>'application/x-gnumeric','e'=>array(0=>'gnumeric')),515=>array('id'=>515,'t'=>'application/x-gramps-xml','e'=>array(0=>'gramps')),516=>array('id'=>516,'t'=>'application/x-gtar','e'=>array(0=>'gtar')),517=>array('id'=>517,'t'=>'application/x-hdf','e'=>array(0=>'hdf')),518=>array('id'=>518,'t'=>'application/x-install-instructions','e'=>array(0=>'install')),519=>array('id'=>519,'t'=>'application/x-iso9660-image','e'=>array(0=>'iso')),520=>array('id'=>520,'t'=>'application/x-java-jnlp-file','e'=>array(0=>'jnlp')),521=>array('id'=>521,'t'=>'application/x-latex','e'=>array(0=>'latex')),522=>array('id'=>522,'t'=>'application/x-lzh-compressed','e'=>array(0=>'lzh',1=>'lha')),523=>array('id'=>523,'t'=>'application/x-mie','e'=>array(0=>'mie')),524=>array('id'=>524,'t'=>'application/x-mobipocket-ebook','e'=>array(0=>'prc',1=>'mobi')),525=>array('id'=>525,'t'=>'application/x-ms-application','e'=>array(0=>'application')),526=>array('id'=>526,'t'=>'application/x-ms-shortcut','e'=>array(0=>'lnk')),527=>array('id'=>527,'t'=>'application/x-ms-wmd','e'=>array(0=>'wmd')),528=>array('id'=>528,'t'=>'application/x-ms-wmz','e'=>array(0=>'wmz')),529=>array('id'=>529,'t'=>'application/x-ms-xbap','e'=>array(0=>'xbap')),530=>array('id'=>530,'t'=>'application/x-msaccess','e'=>array(0=>'mdb')),531=>array('id'=>531,'t'=>'application/x-msbinder','e'=>array(0=>'obd')),532=>array('id'=>532,'t'=>'application/x-mscardfile','e'=>array(0=>'crd')),533=>array('id'=>533,'t'=>'application/x-msclip','e'=>array(0=>'clp')),534=>array('id'=>534,'t'=>'application/x-msdownload','e'=>array(0=>'exe',1=>'dll',2=>'com',3=>'bat',4=>'msi')),535=>array('id'=>535,'t'=>'application/x-msmediaview','e'=>array(0=>'mvb',1=>'m13',2=>'m14')),536=>array('id'=>536,'t'=>'application/x-msmetafile','e'=>array(0=>'wmf',1=>'wmz',2=>'emf',3=>'emz')),537=>array('id'=>537,'t'=>'application/x-msmoney','e'=>array(0=>'mny')),538=>array('id'=>538,'t'=>'application/x-mspublisher','e'=>array(0=>'pub')),539=>array('id'=>539,'t'=>'application/x-msschedule','e'=>array(0=>'scd')),540=>array('id'=>540,'t'=>'application/x-msterminal','e'=>array(0=>'trm')),541=>array('id'=>541,'t'=>'application/x-mswrite','e'=>array(0=>'wri')),542=>array('id'=>542,'t'=>'application/x-netcdf','e'=>array(0=>'nc',1=>'cdf')),543=>array('id'=>543,'t'=>'application/x-nzb','e'=>array(0=>'nzb')),544=>array('id'=>544,'t'=>'application/x-pkcs12','e'=>array(0=>'p12',1=>'pfx')),545=>array('id'=>545,'t'=>'application/x-pkcs7-certificates','e'=>array(0=>'p7b',1=>'spc')),546=>array('id'=>546,'t'=>'application/x-pkcs7-certreqresp','e'=>array(0=>'p7r')),547=>array('id'=>547,'t'=>'application/x-rar-compressed','e'=>array(0=>'rar')),548=>array('id'=>548,'t'=>'application/x-research-info-systems','e'=>array(0=>'ris')),549=>array('id'=>549,'t'=>'application/x-sh','e'=>array(0=>'sh')),550=>array('id'=>550,'t'=>'application/x-shar','e'=>array(0=>'shar')),551=>array('id'=>551,'t'=>'application/x-shockwave-flash','e'=>array(0=>'swf')),552=>array('id'=>552,'t'=>'application/x-silverlight-app','e'=>array(0=>'xap')),553=>array('id'=>553,'t'=>'application/x-sql','e'=>array(0=>'sql')),554=>array('id'=>554,'t'=>'application/x-stuffit','e'=>array(0=>'sit')),555=>array('id'=>555,'t'=>'application/x-stuffitx','e'=>array(0=>'sitx')),556=>array('id'=>556,'t'=>'application/x-subrip','e'=>array(0=>'srt')),557=>array('id'=>557,'t'=>'application/x-sv4cpio','e'=>array(0=>'sv4cpio')),558=>array('id'=>558,'t'=>'application/x-sv4crc','e'=>array(0=>'sv4crc')),559=>array('id'=>559,'t'=>'application/x-t3vm-image','e'=>array(0=>'t3')),560=>array('id'=>560,'t'=>'application/x-tads','e'=>array(0=>'gam')),561=>array('id'=>561,'t'=>'application/x-tar','e'=>array(0=>'tar')),562=>array('id'=>562,'t'=>'application/x-tcl','e'=>array(0=>'tcl')),563=>array('id'=>563,'t'=>'application/x-tex','e'=>array(0=>'tex')),564=>array('id'=>564,'t'=>'application/x-tex-tfm','e'=>array(0=>'tfm')),565=>array('id'=>565,'t'=>'application/x-texinfo','e'=>array(0=>'texinfo',1=>'texi')),566=>array('id'=>566,'t'=>'application/x-tgif','e'=>array(0=>'obj')),567=>array('id'=>567,'t'=>'application/x-ustar','e'=>array(0=>'ustar')),568=>array('id'=>568,'t'=>'application/x-wais-source','e'=>array(0=>'src')),569=>array('id'=>569,'t'=>'application/x-x509-ca-cert','e'=>array(0=>'der',1=>'crt')),570=>array('id'=>570,'t'=>'application/x-xfig','e'=>array(0=>'fig')),571=>array('id'=>571,'t'=>'application/x-xliff+xml','e'=>array(0=>'xlf')),572=>array('id'=>572,'t'=>'application/x-xpinstall','e'=>array(0=>'xpi')),573=>array('id'=>573,'t'=>'application/x-xz','e'=>array(0=>'xz')),574=>array('id'=>574,'t'=>'application/x-zmachine','e'=>array(0=>'z1',1=>'z2',2=>'z3',3=>'z4',4=>'z5',5=>'z6',6=>'z7',7=>'z8')),575=>array('id'=>575,'t'=>'application/xaml+xml','e'=>array(0=>'xaml')),576=>array('id'=>576,'t'=>'application/xcap-diff+xml','e'=>array(0=>'xdf')),577=>array('id'=>577,'t'=>'application/xenc+xml','e'=>array(0=>'xenc')),578=>array('id'=>578,'t'=>'application/xhtml+xml','e'=>array(0=>'xhtml',1=>'xht')),579=>array('id'=>579,'t'=>'application/xml','e'=>array(0=>'xml',1=>'xsl')),580=>array('id'=>580,'t'=>'application/xml-dtd','e'=>array(0=>'dtd')),581=>array('id'=>581,'t'=>'application/xop+xml','e'=>array(0=>'xop')),582=>array('id'=>582,'t'=>'application/xproc+xml','e'=>array(0=>'xpl')),583=>array('id'=>583,'t'=>'application/xslt+xml','e'=>array(0=>'xslt')),584=>array('id'=>584,'t'=>'application/xspf+xml','e'=>array(0=>'xspf')),585=>array('id'=>585,'t'=>'application/xv+xml','e'=>array(0=>'mxml',1=>'xhvml',2=>'xvml',3=>'xvm')),586=>array('id'=>586,'t'=>'application/yang','e'=>array(0=>'yang')),587=>array('id'=>587,'t'=>'application/yin+xml','e'=>array(0=>'yin')),588=>array('id'=>588,'t'=>'application/zip','e'=>array(0=>'zip')),589=>array('id'=>589,'t'=>'audio/adpcm','e'=>array(0=>'adp')),590=>array('id'=>590,'t'=>'audio/basic','e'=>array(0=>'au',1=>'snd')),591=>array('id'=>591,'t'=>'audio/midi','e'=>array(0=>'mid',1=>'midi',2=>'kar',3=>'rmi')),592=>array('id'=>592,'t'=>'audio/mp4','e'=>array(0=>'m4a',1=>'mp4a')),593=>array('id'=>593,'t'=>'audio/mpeg','e'=>array(0=>'mpga',1=>'mp2',2=>'mp2a',3=>'mp3',4=>'m2a',5=>'m3a')),594=>array('id'=>594,'t'=>'audio/ogg','e'=>array(0=>'oga',1=>'ogg',2=>'spx')),595=>array('id'=>595,'t'=>'audio/s3m','e'=>array(0=>'s3m')),596=>array('id'=>596,'t'=>'audio/silk','e'=>array(0=>'sil')),597=>array('id'=>597,'t'=>'audio/vnd.dece.audio','e'=>array(0=>'uva',1=>'uvva')),598=>array('id'=>598,'t'=>'audio/vnd.digital-winds','e'=>array(0=>'eol')),599=>array('id'=>599,'t'=>'audio/vnd.dra','e'=>array(0=>'dra')),600=>array('id'=>600,'t'=>'audio/vnd.dts','e'=>array(0=>'dts')),601=>array('id'=>601,'t'=>'audio/vnd.dts.hd','e'=>array(0=>'dtshd')),602=>array('id'=>602,'t'=>'audio/vnd.lucent.voice','e'=>array(0=>'lvp')),603=>array('id'=>603,'t'=>'audio/vnd.ms-playready.media.pya','e'=>array(0=>'pya')),604=>array('id'=>604,'t'=>'audio/vnd.nuera.ecelp4800','e'=>array(0=>'ecelp4800')),605=>array('id'=>605,'t'=>'audio/vnd.nuera.ecelp7470','e'=>array(0=>'ecelp7470')),606=>array('id'=>606,'t'=>'audio/vnd.nuera.ecelp9600','e'=>array(0=>'ecelp9600')),607=>array('id'=>607,'t'=>'audio/vnd.rip','e'=>array(0=>'rip')),608=>array('id'=>608,'t'=>'audio/webm','e'=>array(0=>'weba')),609=>array('id'=>609,'t'=>'audio/x-aac','e'=>array(0=>'aac')),610=>array('id'=>610,'t'=>'audio/x-aiff','e'=>array(0=>'aif',1=>'aiff',2=>'aifc')),611=>array('id'=>611,'t'=>'audio/x-caf','e'=>array(0=>'caf')),612=>array('id'=>612,'t'=>'audio/x-flac','e'=>array(0=>'flac')),613=>array('id'=>613,'t'=>'audio/x-matroska','e'=>array(0=>'mka')),614=>array('id'=>614,'t'=>'audio/x-mpegurl','e'=>array(0=>'m3u')),615=>array('id'=>615,'t'=>'audio/x-ms-wax','e'=>array(0=>'wax')),616=>array('id'=>616,'t'=>'audio/x-ms-wma','e'=>array(0=>'wma')),617=>array('id'=>617,'t'=>'audio/x-pn-realaudio','e'=>array(0=>'ram',1=>'ra')),618=>array('id'=>618,'t'=>'audio/x-pn-realaudio-plugin','e'=>array(0=>'rmp')),619=>array('id'=>619,'t'=>'audio/x-wav','e'=>array(0=>'wav')),620=>array('id'=>620,'t'=>'audio/xm','e'=>array(0=>'xm')),621=>array('id'=>621,'t'=>'chemical/x-cdx','e'=>array(0=>'cdx')),622=>array('id'=>622,'t'=>'chemical/x-cif','e'=>array(0=>'cif')),623=>array('id'=>623,'t'=>'chemical/x-cmdf','e'=>array(0=>'cmdf')),624=>array('id'=>624,'t'=>'chemical/x-cml','e'=>array(0=>'cml')),625=>array('id'=>625,'t'=>'chemical/x-csml','e'=>array(0=>'csml')),626=>array('id'=>626,'t'=>'chemical/x-xyz','e'=>array(0=>'xyz')),627=>array('id'=>627,'t'=>'image/bmp','e'=>array(0=>'bmp')),628=>array('id'=>628,'t'=>'image/cgm','e'=>array(0=>'cgm')),629=>array('id'=>629,'t'=>'image/g3fax','e'=>array(0=>'g3')),630=>array('id'=>630,'t'=>'image/gif','e'=>array(0=>'gif')),631=>array('id'=>631,'t'=>'image/ief','e'=>array(0=>'ief')),632=>array('id'=>632,'t'=>'image/jpeg','e'=>array(0=>'jpeg',1=>'jpg',2=>'jpe')),633=>array('id'=>633,'t'=>'image/ktx','e'=>array(0=>'ktx')),634=>array('id'=>634,'t'=>'image/png','e'=>array(0=>'png')),635=>array('id'=>635,'t'=>'image/prs.btif','e'=>array(0=>'btif')),636=>array('id'=>636,'t'=>'image/sgi','e'=>array(0=>'sgi')),637=>array('id'=>637,'t'=>'image/svg+xml','e'=>array(0=>'svg',1=>'svgz')),638=>array('id'=>638,'t'=>'image/tiff','e'=>array(0=>'tiff',1=>'tif')),639=>array('id'=>639,'t'=>'image/vnd.adobe.photoshop','e'=>array(0=>'psd')),640=>array('id'=>640,'t'=>'image/vnd.dece.graphic','e'=>array(0=>'uvi',1=>'uvvi',2=>'uvg',3=>'uvvg')),641=>array('id'=>641,'t'=>'image/vnd.djvu','e'=>array(0=>'djvu',1=>'djv')),642=>array('id'=>642,'t'=>'image/vnd.dvb.subtitle','e'=>array(0=>'sub')),643=>array('id'=>643,'t'=>'image/vnd.dwg','e'=>array(0=>'dwg')),644=>array('id'=>644,'t'=>'image/vnd.dxf','e'=>array(0=>'dxf')),645=>array('id'=>645,'t'=>'image/vnd.fastbidsheet','e'=>array(0=>'fbs')),646=>array('id'=>646,'t'=>'image/vnd.fpx','e'=>array(0=>'fpx')),647=>array('id'=>647,'t'=>'image/vnd.fst','e'=>array(0=>'fst')),648=>array('id'=>648,'t'=>'image/vnd.fujixerox.edmics-mmr','e'=>array(0=>'mmr')),649=>array('id'=>649,'t'=>'image/vnd.fujixerox.edmics-rlc','e'=>array(0=>'rlc')),650=>array('id'=>650,'t'=>'image/vnd.ms-modi','e'=>array(0=>'mdi')),651=>array('id'=>651,'t'=>'image/vnd.ms-photo','e'=>array(0=>'wdp')),652=>array('id'=>652,'t'=>'image/vnd.net-fpx','e'=>array(0=>'npx')),653=>array('id'=>653,'t'=>'image/vnd.wap.wbmp','e'=>array(0=>'wbmp')),654=>array('id'=>654,'t'=>'image/vnd.xiff','e'=>array(0=>'xif')),655=>array('id'=>655,'t'=>'image/webp','e'=>array(0=>'webp')),656=>array('id'=>656,'t'=>'image/x-3ds','e'=>array(0=>'3ds')),657=>array('id'=>657,'t'=>'image/x-cmu-raster','e'=>array(0=>'ras')),658=>array('id'=>658,'t'=>'image/x-cmx','e'=>array(0=>'cmx')),659=>array('id'=>659,'t'=>'image/x-freehand','e'=>array(0=>'fh',1=>'fhc',2=>'fh4',3=>'fh5',4=>'fh7')),660=>array('id'=>660,'t'=>'image/x-icon','e'=>array(0=>'ico')),661=>array('id'=>661,'t'=>'image/x-mrsid-image','e'=>array(0=>'sid')),662=>array('id'=>662,'t'=>'image/x-pcx','e'=>array(0=>'pcx')),663=>array('id'=>663,'t'=>'image/x-pict','e'=>array(0=>'pic',1=>'pct')),664=>array('id'=>664,'t'=>'image/x-portable-anymap','e'=>array(0=>'pnm')),665=>array('id'=>665,'t'=>'image/x-portable-bitmap','e'=>array(0=>'pbm')),666=>array('id'=>666,'t'=>'image/x-portable-graymap','e'=>array(0=>'pgm')),667=>array('id'=>667,'t'=>'image/x-portable-pixmap','e'=>array(0=>'ppm')),668=>array('id'=>668,'t'=>'image/x-rgb','e'=>array(0=>'rgb')),669=>array('id'=>669,'t'=>'image/x-tga','e'=>array(0=>'tga')),670=>array('id'=>670,'t'=>'image/x-xbitmap','e'=>array(0=>'xbm')),671=>array('id'=>671,'t'=>'image/x-xpixmap','e'=>array(0=>'xpm')),672=>array('id'=>672,'t'=>'image/x-xwindowdump','e'=>array(0=>'xwd')),673=>array('id'=>673,'t'=>'message/rfc822','e'=>array(0=>'eml',1=>'mime')),674=>array('id'=>674,'t'=>'model/iges','e'=>array(0=>'igs',1=>'iges')),675=>array('id'=>675,'t'=>'model/mesh','e'=>array(0=>'msh',1=>'mesh',2=>'silo')),676=>array('id'=>676,'t'=>'model/vnd.collada+xml','e'=>array(0=>'dae')),677=>array('id'=>677,'t'=>'model/vnd.dwf','e'=>array(0=>'dwf')),678=>array('id'=>678,'t'=>'model/vnd.gdl','e'=>array(0=>'gdl')),679=>array('id'=>679,'t'=>'model/vnd.gtw','e'=>array(0=>'gtw')),680=>array('id'=>680,'t'=>'model/vnd.mts','e'=>array(0=>'mts')),681=>array('id'=>681,'t'=>'model/vnd.vtu','e'=>array(0=>'vtu')),682=>array('id'=>682,'t'=>'model/vrml','e'=>array(0=>'wrl',1=>'vrml')),683=>array('id'=>683,'t'=>'model/x3d+binary','e'=>array(0=>'x3db',1=>'x3dbz')),684=>array('id'=>684,'t'=>'model/x3d+vrml','e'=>array(0=>'x3dv',1=>'x3dvz')),685=>array('id'=>685,'t'=>'model/x3d+xml','e'=>array(0=>'x3d',1=>'x3dz')),686=>array('id'=>686,'t'=>'text/cache-manifest','e'=>array(0=>'appcache')),687=>array('id'=>687,'t'=>'text/calendar','e'=>array(0=>'ics',1=>'ifb')),688=>array('id'=>688,'t'=>'text/css','e'=>array(0=>'css')),689=>array('id'=>689,'t'=>'text/csv','e'=>array(0=>'csv')),690=>array('id'=>690,'t'=>'text/html','e'=>array(0=>'html',1=>'htm')),691=>array('id'=>691,'t'=>'text/n3','e'=>array(0=>'n3')),692=>array('id'=>692,'t'=>'text/plain','e'=>array(0=>'txt',1=>'text',2=>'conf',3=>'def',4=>'list',5=>'log',6=>'in')),693=>array('id'=>693,'t'=>'text/prs.lines.tag','e'=>array(0=>'dsc')),694=>array('id'=>694,'t'=>'text/richtext','e'=>array(0=>'rtx')),695=>array('id'=>695,'t'=>'text/sgml','e'=>array(0=>'sgml',1=>'sgm')),696=>array('id'=>696,'t'=>'text/tab-separated-values','e'=>array(0=>'tsv')),697=>array('id'=>697,'t'=>'text/troff','e'=>array(0=>'t',1=>'tr',2=>'roff',3=>'man',4=>'me',5=>'ms')),698=>array('id'=>698,'t'=>'text/turtle','e'=>array(0=>'ttl')),699=>array('id'=>699,'t'=>'text/uri-list','e'=>array(0=>'uri',1=>'uris',2=>'urls')),700=>array('id'=>700,'t'=>'text/vcard','e'=>array(0=>'vcard')),701=>array('id'=>701,'t'=>'text/vnd.curl','e'=>array(0=>'curl')),702=>array('id'=>702,'t'=>'text/vnd.curl.dcurl','e'=>array(0=>'dcurl')),703=>array('id'=>703,'t'=>'text/vnd.curl.mcurl','e'=>array(0=>'mcurl')),704=>array('id'=>704,'t'=>'text/vnd.curl.scurl','e'=>array(0=>'scurl')),705=>array('id'=>705,'t'=>'text/vnd.dvb.subtitle','e'=>array(0=>'sub')),706=>array('id'=>706,'t'=>'text/vnd.fly','e'=>array(0=>'fly')),707=>array('id'=>707,'t'=>'text/vnd.fmi.flexstor','e'=>array(0=>'flx')),708=>array('id'=>708,'t'=>'text/vnd.graphviz','e'=>array(0=>'gv')),709=>array('id'=>709,'t'=>'text/vnd.in3d.3dml','e'=>array(0=>'3dml')),710=>array('id'=>710,'t'=>'text/vnd.in3d.spot','e'=>array(0=>'spot')),711=>array('id'=>711,'t'=>'text/vnd.sun.j2me.app-descriptor','e'=>array(0=>'jad')),712=>array('id'=>712,'t'=>'text/vnd.wap.wml','e'=>array(0=>'wml')),713=>array('id'=>713,'t'=>'text/vnd.wap.wmlscript','e'=>array(0=>'wmls')),714=>array('id'=>714,'t'=>'text/x-asm','e'=>array(0=>'s',1=>'asm')),715=>array('id'=>715,'t'=>'text/x-c','e'=>array(0=>'c',1=>'cc',2=>'cxx',3=>'cpp',4=>'h',5=>'hh',6=>'dic')),716=>array('id'=>716,'t'=>'text/x-fortran','e'=>array(0=>'f',1=>'for',2=>'f77',3=>'f90')),717=>array('id'=>717,'t'=>'text/x-java-source','e'=>array(0=>'java')),718=>array('id'=>718,'t'=>'text/x-nfo','e'=>array(0=>'nfo')),719=>array('id'=>719,'t'=>'text/x-opml','e'=>array(0=>'opml')),720=>array('id'=>720,'t'=>'text/x-pascal','e'=>array(0=>'p',1=>'pas')),721=>array('id'=>721,'t'=>'text/x-setext','e'=>array(0=>'etx')),722=>array('id'=>722,'t'=>'text/x-sfv','e'=>array(0=>'sfv')),723=>array('id'=>723,'t'=>'text/x-uuencode','e'=>array(0=>'uu')),724=>array('id'=>724,'t'=>'text/x-vcalendar','e'=>array(0=>'vcs')),725=>array('id'=>725,'t'=>'text/x-vcard','e'=>array(0=>'vcf')),726=>array('id'=>726,'t'=>'video/3gpp','e'=>array(0=>'3gp')),727=>array('id'=>727,'t'=>'video/3gpp2','e'=>array(0=>'3g2')),728=>array('id'=>728,'t'=>'video/h261','e'=>array(0=>'h261')),729=>array('id'=>729,'t'=>'video/h263','e'=>array(0=>'h263')),730=>array('id'=>730,'t'=>'video/h264','e'=>array(0=>'h264')),731=>array('id'=>731,'t'=>'video/jpeg','e'=>array(0=>'jpgv')),732=>array('id'=>732,'t'=>'video/jpm','e'=>array(0=>'jpm',1=>'jpgm')),733=>array('id'=>733,'t'=>'video/mj2','e'=>array(0=>'mj2',1=>'mjp2')),734=>array('id'=>734,'t'=>'video/mp4','e'=>array(0=>'mp4',1=>'mp4v',2=>'mpg4')),735=>array('id'=>735,'t'=>'video/mpeg','e'=>array(0=>'mpeg',1=>'mpg',2=>'mpe',3=>'m1v',4=>'m2v')),736=>array('id'=>736,'t'=>'video/ogg','e'=>array(0=>'ogv')),737=>array('id'=>737,'t'=>'video/quicktime','e'=>array(0=>'qt',1=>'mov')),738=>array('id'=>738,'t'=>'video/vnd.dece.hd','e'=>array(0=>'uvh',1=>'uvvh')),739=>array('id'=>739,'t'=>'video/vnd.dece.mobile','e'=>array(0=>'uvm',1=>'uvvm')),740=>array('id'=>740,'t'=>'video/vnd.dece.pd','e'=>array(0=>'uvp',1=>'uvvp')),741=>array('id'=>741,'t'=>'video/vnd.dece.sd','e'=>array(0=>'uvs',1=>'uvvs')),742=>array('id'=>742,'t'=>'video/vnd.dece.video','e'=>array(0=>'uvv',1=>'uvvv')),743=>array('id'=>743,'t'=>'video/vnd.dvb.file','e'=>array(0=>'dvb')),744=>array('id'=>744,'t'=>'video/vnd.fvt','e'=>array(0=>'fvt')),745=>array('id'=>745,'t'=>'video/vnd.mpegurl','e'=>array(0=>'mxu',1=>'m4u')),746=>array('id'=>746,'t'=>'video/vnd.ms-playready.media.pyv','e'=>array(0=>'pyv')),747=>array('id'=>747,'t'=>'video/vnd.uvvu.mp4','e'=>array(0=>'uvu',1=>'uvvu')),748=>array('id'=>748,'t'=>'video/vnd.vivo','e'=>array(0=>'viv')),749=>array('id'=>749,'t'=>'video/webm','e'=>array(0=>'webm')),750=>array('id'=>750,'t'=>'video/x-f4v','e'=>array(0=>'f4v')),751=>array('id'=>751,'t'=>'video/x-fli','e'=>array(0=>'fli')),752=>array('id'=>752,'t'=>'video/x-flv','e'=>array(0=>'flv')),753=>array('id'=>753,'t'=>'video/x-m4v','e'=>array(0=>'m4v')),754=>array('id'=>754,'t'=>'video/x-matroska','e'=>array(0=>'mkv',1=>'mk3d',2=>'mks')),755=>array('id'=>755,'t'=>'video/x-mng','e'=>array(0=>'mng')),756=>array('id'=>756,'t'=>'video/x-ms-asf','e'=>array(0=>'asf',1=>'asx')),757=>array('id'=>757,'t'=>'video/x-ms-vob','e'=>array(0=>'vob')),758=>array('id'=>758,'t'=>'video/x-ms-wm','e'=>array(0=>'wm')),759=>array('id'=>759,'t'=>'video/x-ms-wmv','e'=>array(0=>'wmv')),760=>array('id'=>760,'t'=>'video/x-ms-wmx','e'=>array(0=>'wmx')),761=>array('id'=>761,'t'=>'video/x-ms-wvx','e'=>array(0=>'wvx')),762=>array('id'=>762,'t'=>'video/x-msvideo','e'=>array(0=>'avi')),763=>array('id'=>763,'t'=>'video/x-sgi-movie','e'=>array(0=>'movie')),764=>array('id'=>764,'t'=>'video/x-smv','e'=>array(0=>'smv')),765=>array('id'=>765,'t'=>'x-conference/x-cooltalk','e'=>array(0=>'ice'))); \ No newline at end of file diff --git a/app/data/uploads/.gitkeep b/app/data/uploads/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/cli-client/main.php b/cli-client/main.php index d19bed3f4..dde48a5e6 100755 --- a/cli-client/main.php +++ b/cli-client/main.php @@ -140,7 +140,7 @@ class Config { } -class FolderItem { +class BaseItem { private $title = ''; private $body = ''; @@ -183,17 +183,17 @@ class FolderItem { } -class FolderItems { +class BaseItems { private $items = array(); - private function getFolderItems($dir, $parentId, &$output) { + private function getBaseItems($dir, $parentId, &$output) { $paths = glob($dir . '/*'); foreach ($paths as $path) { $isFolder = is_dir($path); $modTime = filemtime($path); - $o = new FolderItem(); + $o = new BaseItem(); $o->setTitle(basename($path)); $o->setId(Api::createId($parentId . '_' . $o->title())); $o->setParentId($parentId); @@ -202,13 +202,13 @@ class FolderItems { if (!$isFolder) $o->setBody(file_get_contents($path)); $output[] = $o; - if ($isFolder) $this->getFolderItems($path, $o->id(), $output); + if ($isFolder) $this->getBaseItems($path, $o->id(), $output); } } public function fromPath($path) { $this->items = array(); - $this->getFolderItems($path, null, $this->items); + $this->getBaseItems($path, null, $this->items); } public function all() { @@ -272,8 +272,8 @@ $api->setSessionId($session['id']); if (array_key_exists('sync', $flags)) { $syncStartTime = time(); $lastSyncTime = $config->get('last_sync_time'); - $folderItems = new FolderItems(); - $folderItems->fromPath($dataPath); + $BaseItems = new BaseItems(); + $BaseItems->fromPath($dataPath); // ------------------------------------------------------------------------------------------ // Get latest changes from API @@ -287,7 +287,7 @@ if (array_key_exists('sync', $flags)) { $notes = array(); $maxId = null; foreach ($response['items'] as $item) { - $folderItem = new FolderItem(); + $BaseItem = new BaseItem(); switch ($item['type']) { @@ -295,7 +295,7 @@ if (array_key_exists('sync', $flags)) { case 'update': $resource = $api->exec('GET', $item['item_type'] . 's/' . $item['item_id']); - $folderItem->fromApiArray($item['item_type'], $resource); + $BaseItem->fromApiArray($item['item_type'], $resource); break; default: @@ -304,13 +304,13 @@ if (array_key_exists('sync', $flags)) { } - $folderItems->setById($folderItem->id(), $folderItem); + $BaseItems->setById($BaseItem->id(), $BaseItem); $maxId = max($item['id'], $maxId); } - foreach ($folderItems->all() as $item) { - $relativePath = $folderItems->itemFullPath($item); + foreach ($BaseItems->all() as $item) { + $relativePath = $BaseItems->itemFullPath($item); $path = $dataPath . '/' . $relativePath; foreach (array('folder', 'note') as $itemType) { @@ -333,7 +333,7 @@ if (array_key_exists('sync', $flags)) { // Send changed notes and folders to API // ------------------------------------------------------------------------------------------ - foreach ($folderItems->all() as $item) { + foreach ($BaseItems->all() as $item) { if ($item->modTime() < $lastSyncTime) continue; if ($item->isFolder()) { diff --git a/spa_client/.babelrc b/spa_client/.babelrc new file mode 100755 index 000000000..12a3a64be --- /dev/null +++ b/spa_client/.babelrc @@ -0,0 +1,12 @@ +{ + "presets": [ + "es2015", + "react", + "stage-0" + ], + "plugins": [ + [ + "transform-decorators-legacy" + ] + ] +} diff --git a/spa_client/.gitignore b/spa_client/.gitignore new file mode 100755 index 000000000..083499c5b --- /dev/null +++ b/spa_client/.gitignore @@ -0,0 +1,39 @@ +# Logs +logs +*.log +npm-debug.log* + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +node_modules + +# Optional npm cache directory +.npm + +# Optional REPL history +.node_repl_history + +# Ignore files for distribution +dist/* + +# OSX .DS_Store files +.DS_Store diff --git a/spa_client/README.md b/spa_client/README.md new file mode 100755 index 000000000..5cd4d19ba --- /dev/null +++ b/spa_client/README.md @@ -0,0 +1,19 @@ +React/Redux Example Todo Application +==================================== + +An example application demonstrating how to build a Todo with React and Redux. + +# How to run + +Open up a terminal and execute: + +```term +$ npm install +$ npm start +``` + +Then open up your browser and navigate to [http://localhost:3000/](http://localhost:3000/). + +# License + +Apache 2.0 diff --git a/spa_client/package.json b/spa_client/package.json new file mode 100755 index 000000000..0895fc9ac --- /dev/null +++ b/spa_client/package.json @@ -0,0 +1,42 @@ +{ + "name": "stormpath-react-redux-todo-example-application", + "version": "0.0.1", + "description": "React/Redux example todo application.", + "homepage": "https://github.com/typerandom/stormpath-react-redux-todo-example-application", + "author": "Stormpath, 2016", + "license": "Apache-2.0", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "dev": "node ./server ./src/ ./webpack.dev.config", + "build": "rm -rf ./dist/ && mkdir ./dist/ && cp -r ./src/* ./dist && rm -rf ./dist/js/* && webpack", + "start": "npm run build && node ./server" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/typerandom/stormpath-react-redux-todo-example-application.git" + }, + "bugs": { + "url": "https://github.com/typerandom/stormpath-react-redux-todo-example-application/issues" + }, + "devDependencies": { + "babel-core": "^6.3.26", + "babel-loader": "^6.2.0", + "babel-plugin-react-transform": "^2.0.0", + "babel-plugin-transform-decorators-legacy": "^1.3.4", + "babel-preset-es2015": "^6.3.13", + "babel-preset-react": "^6.3.13", + "babel-preset-stage-0": "^6.3.13", + "babel-runtime": "^6.3.19", + "express": "^4.13.4", + "morgan": "^1.7.0", + "open": "0.0.5", + "react": "^0.14.7", + "react-dom": "^0.14.7", + "react-redux": "^4.4.6", + "redux": "^3.4.0", + "webpack": "^1.12.13", + "webpack-dev-middleware": "^1.5.1", + "object-path-immutable": "^0.5.1", + "deepcopy": "^0.6.3" + } +} diff --git a/spa_client/server.js b/spa_client/server.js new file mode 100755 index 000000000..d15fcb4b9 --- /dev/null +++ b/spa_client/server.js @@ -0,0 +1,32 @@ +var open = require('open'); +var path = require('path'); +var morgan = require('morgan'); +var express = require('express'); +var webpack = require('webpack'); +var webpackDevMiddleware = require('webpack-dev-middleware'); + +var config = require('./webpack.config'); +var compiler = webpack(config); + +var app = express(); + +app.use(morgan('dev')); + +app.use(webpackDevMiddleware(compiler, { + noInfo: true, + publicPath: config.output.publicPath +})); + +app.use(express.static('./dist/')); + +app.get('*', function (req, res){ + res.sendFile(path.resolve(__dirname, './dist/', 'index.html')) +}); + +app.listen(3000, function (err) { + if (err) { + return console.error(err); + } + + console.log('Web listening at http://localhost:3000/.'); +}); diff --git a/spa_client/src/index.html b/spa_client/src/index.html new file mode 100755 index 000000000..be499010b --- /dev/null +++ b/spa_client/src/index.html @@ -0,0 +1,39 @@ + + + + + + + + + +
+ + + diff --git a/spa_client/src/js/app.jsx b/spa_client/src/js/app.jsx new file mode 100755 index 000000000..8e8309008 --- /dev/null +++ b/spa_client/src/js/app.jsx @@ -0,0 +1,420 @@ +import React from 'react'; +import { render } from 'react-dom' +import { createStore } from 'redux'; +import { Provider } from 'react-redux' +import RootFolderList from 'components/root-folder-list.jsx'; +import NoteList from 'components/note-list.jsx'; +import { reducer } from './reducer.jsx' + +let defaultState = { + 'myButtonLabel': 'click', + items: [ + { id: 101, title: 'folder 1', type: 1, parent_id: 0 }, + { id: 102, title: 'folder 2', type: 1, parent_id: 0 }, + { id: 103, title: 'folder 3', type: 1, parent_id: 101 }, + { id: 104, title: 'folder 4', type: 1, parent_id: 101 }, + { id: 105, title: 'folder 5', type: 1, parent_id: 0 }, + { id: 106, title: 'folder 6', type: 1, parent_id: 105 }, + { id: 1, type: 2, parent_id: 101, title: 'one', body: '111 dsqfdsmlk mqkfkdq sfkl qlmskfqm' }, + { id: 2, type: 2, parent_id: 101, title: 'two', body: '222 dsqfdsmlk mqkfkdq sfkl 222 qlmskfqm' }, + { id: 3, type: 2, parent_id: 103, title: 'three', body: '33 dsqfdsmlk mqkfkdq sfkl 33 qlmskfqm' }, + { id: 4, type: 2, parent_id: 103, title: 'four', body: '4222 dsqfdsmlk mqkfkdq sfkl 222 qlmskfqm' }, + { id: 5, type: 2, parent_id: 103, title: 'five', body: '5222 dsqfdsmlk mqkfkdq sfkl 222 qlmskfqm' }, + { id: 6, type: 2, parent_id: 104, title: 'six', body: '6222 dsqfdsmlk mqkfkdq sfkl 222 qlmskfqm' }, + { id: 7, type: 2, parent_id: 104, title: 'seven', body: '7222 dsqfdsmlk mqkfkdq sfkl 222 qlmskfqm' }, + ], + selectedFolderId: null, + selectedNoteId: null, + expandedFolderIds: [], +} + +let store = createStore(reducer, defaultState) + +class App extends React.Component { + + render() { + return ( +
+ + +
+ ) + } + +} + +render( + + + , + document.getElementById('container') +) + + +// var defaultState = { +// folders: [], +// todo: { +// items: [] +// }, +// selectedFolderId: null +// }; + +// function addTodo(message) { +// return { +// type: 'ADD_TODO', +// message: message, +// completed: false +// }; +// } + +// function completeTodo(index) { +// return { +// type: 'COMPLETE_TODO', +// index: index +// }; +// } + +// function deleteTodo(index) { +// return { +// type: 'DELETE_TODO', +// index: index +// }; +// } + +// function clearTodo() { +// return { +// type: 'CLEAR_TODO' +// }; +// } + +// function createId() { +// return Math.round(Math.random() * 99999); +// } + +// function folderIndex(state, id) { +// for (var i = 0; i < state.folders.length; i++) { +// if (state.folders[i].id == id) return i; +// } +// return -1; +// } + +// function folderById(state, id) { +// var i = folderIndex(state, id); +// return i >= 0 ? state.folders[i] : null; +// } + +// function todoApp(state, action) { + +// switch (action.type) { + +// case 'ADD_FOLDER': + +// var folder = { +// name: action.name, +// id: createId(), +// selected: false +// }; + +// state = immutable.push(state, 'folders', folder); +// state = immutable.set(state, 'selectedFolderId', folder.id); +// return state; + +// case 'DELETE_FOLDER': + +// var folders = deepcopy(state.folders); +// var index = folderIndex(state, action.id); +// if (index < 0) return state; +// folders.splice(index, 1); +// return immutable.set(state, 'folders', folders); + +// case 'SET_SELECTED_FOLDER': + +// return immutable.set(state, 'selectedFolderId', action.id); + +// case 'SET_FOLDER_NAME': + +// var idx = folderIndex(state, action.id); +// return immutable.set(state, 'folders.' + idx + '.name', action.name); + +// case 'ADD_TODO': +// var items = [].concat(state.todo.items); +// return Object.assign({}, state, { +// todo: { +// items: items.concat([{ +// message: action.message, +// completed: false +// }]) +// } +// }); + +// case 'COMPLETE_TODO': +// var items = [].concat(state.todo.items); + +// items[action.index].completed = true; + +// return Object.assign({}, state, { +// todo: { +// items: items +// } +// }); + +// case 'DELETE_TODO': +// var items = [].concat(state.todo.items); + +// items.splice(action.index, 1); + +// return Object.assign({}, state, { +// todo: { +// items: items +// } +// }); + +// case 'CLEAR_TODO': +// return Object.assign({}, state, { +// todo: { +// items: [] +// } +// }); + +// default: +// return state; +// } +// } + +// var store = createStore(todoApp, defaultState); + +// class AddTodoForm extends React.Component { +// state = { +// message: '' +// }; + +// onFormSubmit(e) { +// e.preventDefault(); +// store.dispatch(addTodo(this.state.message)); +// this.setState({ message: '' }); +// } + +// onMessageChanged(e) { +// var message = e.target.value; +// this.setState({ message: message }); +// } + +// render() { +// return ( +//
+// +// +//
+// ); +// } +// } + +// class AddFolderForm extends React.Component { +// state = { +// name: '' +// }; + +// onFormSubmit(e) { +// e.preventDefault(); +// store.dispatch({ +// type: 'ADD_FOLDER', +// name: this.state.name +// }); +// this.setState({ name: '' }); +// } + +// onInputChange(e) { +// this.setState({ name: e.target.value }); +// } + +// render() { +// return ( +//
+// +// +//
+// ); +// } +// } + +// class TodoItem extends React.Component { +// onDeleteClick() { +// store.dispatch(deleteTodo(this.props.index)); +// } + +// onCompletedClick() { +// store.dispatch(completeTodo(this.props.index)); +// } + +// render() { +// return ( +//
  • +// {this.props.message.trim()}  +// [x] +//
  • +// ); +// } +// } + +// class FolderItem extends React.Component { +// onDeleteClick() { +// store.dispatch({ +// type: 'DELETE_FOLDER', +// id: this.props.item.id +// }); +// } + +// onSelected() { +// store.dispatch({ +// type: 'SET_SELECTED_FOLDER', +// id: this.props.item.id +// }); +// } + +// render() { +// let selectedClass = this.props.selected ? 'selected' : ''; +// return ( +//
  • +// {this.props.item.name} ({this.props.item.id}) [x] +//
  • +// ); +// } +// } + +// class FolderList extends React.Component { +// state = { +// folders: [], +// selectedFolderId: null, +// folderName: '', +// lastSelectedFolderId: null +// }; + +// componentWillMount() { +// store.subscribe(() => { +// var state = store.getState(); +// this.setState({ +// folders: state.folders, +// selectedFolderId: state.selectedFolderId +// }); +// }); +// } + +// folderNameInput_keyPress(e) { +// if (e.key == 'Enter') { +// console.info(this.state.folderName); +// store.dispatch({ +// type: 'SET_FOLDER_NAME', +// name: this.state.folderName, +// id: this.state.selectedFolderId +// }); +// } +// } + +// folderNameInput_onChange(e) { +// this.setState({ folderName: e.target.value }); +// } + +// render() { +// var items = []; + +// this.state.folders.forEach((item, index) => { +// let isSelected = this.state.selectedFolderId == item.id; +// items.push( +// +// ); +// }); + +// if (!items.length) { +// return ( +//

    +// No folder. +//

    +// ); +// } + +// var selectedFolder = folderById(this.state, this.state.selectedFolderId); +// var selectedFolderId = selectedFolder ? selectedFolder.id : null; +// if (selectedFolderId !== this.state.lastSelectedFolderId) { +// this.state.folderName = selectedFolder ? selectedFolder.name : ''; +// this.state.lastSelectedFolderId = selectedFolderId; +// } + +// return ( +//
    +//
      { items }
    +// +//
    +// ); +// } +// } + + +// class TodoList extends React.Component { +// state = { +// items: [] +// }; + +// componentWillMount() { +// store.subscribe(() => { +// var state = store.getState(); +// this.setState({ +// items: state.todo.items +// }); +// }); +// } + +// render() { +// var items = []; + +// this.state.items.forEach((item, index) => { +// items.push(); +// }); + +// if (!items.length) { +// return ( +//

    +// Please add something to do. +//

    +// ); +// } + +// return ( +//
      { items }
    +// ); +// } +// } + +// ReactDOM.render( +//
    +//

    Todo

    +// +// +// +// +//
    , +// document.getElementById('container') +// ); + +// store.dispatch({ +// type: 'ADD_FOLDER', +// name: 'aaaa' +// }); + +// store.dispatch({ +// type: 'ADD_FOLDER', +// name: 'bbbb' +// }); + +// store.dispatch({ +// type: 'ADD_FOLDER', +// name: 'cccc' +// }); diff --git a/spa_client/src/js/components/folder-list.jsx b/spa_client/src/js/components/folder-list.jsx new file mode 100755 index 000000000..37eb12ca3 --- /dev/null +++ b/spa_client/src/js/components/folder-list.jsx @@ -0,0 +1,39 @@ +import React from 'react'; +import Folder from './folder.jsx'; +import { connect } from 'react-redux'; +import * as fi from 'models/folder-item.jsx'; + +class FolderListComponent extends React.Component { + + render() { + let elements = []; + let level = Number(this.props.level) + 1; + let className = 'level-' + level; + className += ' folder-list'; + + this.props.items.forEach((item, index) => { + if (this.props.parentId != item.parent_id) return; + let selected = this.props.selectedFolderId == item.id; + let children = fi.children(this.props.items, item.id); + elements.push(); + }); + + return
    {elements}
    + } + +} + +const mapStateToProps = function(state) { + return {} +} + +const mapDispatchToProps = function(dispatch) { + return {} +} + +const FolderList = connect( + mapStateToProps, + mapDispatchToProps +)(FolderListComponent) + +export default FolderList \ No newline at end of file diff --git a/spa_client/src/js/components/folder.jsx b/spa_client/src/js/components/folder.jsx new file mode 100755 index 000000000..374810a75 --- /dev/null +++ b/spa_client/src/js/components/folder.jsx @@ -0,0 +1,50 @@ +import React from 'react'; +import { connect } from 'react-redux' +import FolderList from './folder-list.jsx'; + +class FolderComponent extends React.Component { + + render() { + let selectedClass = this.props.selectedFolderId == this.props.id ? 'selected' : ''; + let elements = []; + let key = 'note-name-' + this.props.id; + + elements.push( +
    {this.props.title}
    + ); + + var showChildren = this.props.children.length && this.props.expandedFolderIds.indexOf(this.props.id) >= 0; + + if (showChildren) { + key = 'folder-list-' + this.props.id; + elements.push( + + ); + } + + return
    {elements}
    + } + +} + +const Folder = connect( + function(state) { return {} }, + + function(dispatch) { + return { + onClick: function(event) { + dispatch({ + type: 'SELECT_FOLDER', + id: this.props.id, + }); + dispatch({ + type: 'TOGGLE_FOLDER', + id: this.props.id, + }); + } + } + } + +)(FolderComponent) + +export default Folder \ No newline at end of file diff --git a/spa_client/src/js/components/my-button.js b/spa_client/src/js/components/my-button.js new file mode 100755 index 000000000..a7b80e270 --- /dev/null +++ b/spa_client/src/js/components/my-button.js @@ -0,0 +1,11 @@ +import React from 'react'; + +class MyButton extends React.Component { + + render() { + return + } + +} + +export default MyButton \ No newline at end of file diff --git a/spa_client/src/js/components/note-list-item.jsx b/spa_client/src/js/components/note-list-item.jsx new file mode 100755 index 000000000..4358ee852 --- /dev/null +++ b/spa_client/src/js/components/note-list-item.jsx @@ -0,0 +1,28 @@ +import React from 'react'; +import { connect } from 'react-redux' + +class NoteListItemComponent extends React.Component { + + render() { + let className = this.props.selected ? 'selected' : ''; + return
    {this.props.title}
    + } + +} + +const NoteListItem = connect( + function(state) { return {} }, + function(dispatch) { + return { + onClick: function(event) { + console.info(this.props.id); + dispatch({ + type: 'SELECT_NOTE', + id: this.props.id, + }); + } + } + } +)(NoteListItemComponent) + +export default NoteListItem \ No newline at end of file diff --git a/spa_client/src/js/components/note-list.jsx b/spa_client/src/js/components/note-list.jsx new file mode 100755 index 000000000..f448d2e25 --- /dev/null +++ b/spa_client/src/js/components/note-list.jsx @@ -0,0 +1,37 @@ +import React from 'react'; +import NoteListItem from './note-list-item.jsx'; +import { connect } from 'react-redux' +import * as fi from 'models/folder-item.jsx'; + +class NoteListComponent extends React.Component { + + render() { + let elements = []; + + this.props.items.forEach((item, index) => { + let selected = this.props.selectedNoteId == item.id; + elements.push(); + }); + + return
    {elements}
    ; + } + +} + +const mapStateToProps = function(state) { + return { + items: fi.notes(state.items, state.selectedFolderId), + selectedNoteId: state.selectedNoteId, + }; +} + +const mapDispatchToProps = function(dispatch) { + return { } +} + +const NoteList = connect( + mapStateToProps, + mapDispatchToProps +)(NoteListComponent) + +export default NoteList \ No newline at end of file diff --git a/spa_client/src/js/components/root-folder-list.jsx b/spa_client/src/js/components/root-folder-list.jsx new file mode 100755 index 000000000..c65d7e6c4 --- /dev/null +++ b/spa_client/src/js/components/root-folder-list.jsx @@ -0,0 +1,31 @@ +import React from 'react'; +import FolderList from './folder-list.jsx'; +import { connect } from 'react-redux'; +import * as fi from 'models/folder-item.jsx'; + +class RootFolderListComponent extends React.Component { + + render() { + return + } + +} + +const mapStateToProps = function(state) { + return { + items: fi.folders(state.items), + selectedFolderId: state.selectedFolderId, + expandedFolderIds: state.expandedFolderIds, + }; +} + +const mapDispatchToProps = function(dispatch) { + return {} +} + +const RootFolderList = connect( + mapStateToProps, + mapDispatchToProps +)(RootFolderListComponent) + +export default RootFolderList \ No newline at end of file diff --git a/spa_client/src/js/models/folder-item.jsx b/spa_client/src/js/models/folder-item.jsx new file mode 100755 index 000000000..35edd55b9 --- /dev/null +++ b/spa_client/src/js/models/folder-item.jsx @@ -0,0 +1,42 @@ +export function rootItems(items) { + var output = []; + items.forEach((item, index) => { + if (!item.parent_id) return; + output.push(item); + }); + return output; +} + +export function folders(items) { + var output = []; + items.forEach((item, index) => { + if (item.type != 1) return; + output.push(item); + }); + return output; +} + +export function notes(items, folderId) { + var output = []; + items.forEach((item, index) => { + if (item.type != 2) return; + if (item.parent_id != folderId) return; + output.push(item); + }); + return output; +} + +export function byId(items, id) { + for (let i = 0; i < items.length; i++) { + if (items[i].id == id) return items[i]; + } + return null; +} + +export function children(items, id) { + var output = []; + for (let i = 0; i < items.length; i++) { + if (items[i].parent_id == id) output.push(items[i]); + } + return output; +} \ No newline at end of file diff --git a/spa_client/src/js/reducer.jsx b/spa_client/src/js/reducer.jsx new file mode 100755 index 000000000..8af99fc4c --- /dev/null +++ b/spa_client/src/js/reducer.jsx @@ -0,0 +1,32 @@ +import deepcopy from 'deepcopy'; + +export function reducer(state, action) { + switch (action.type) { + + case 'SELECT_FOLDER': + + var state = deepcopy(state); + state.selectedFolderId = action.id; + return state; + + case 'SELECT_NOTE': + + var state = deepcopy(state); + state.selectedNoteId = action.id; + return state; + + case 'TOGGLE_FOLDER': + + var state = deepcopy(state); + var idx = state.expandedFolderIds.indexOf(action.id); + if (idx < 0) { + state.expandedFolderIds.push(action.id); + } else { + state.expandedFolderIds.splice(idx, 1); + } + return state; + + } + + return state; +} \ No newline at end of file diff --git a/spa_client/src/js/simple-example.js b/spa_client/src/js/simple-example.js new file mode 100755 index 000000000..f6d490bce --- /dev/null +++ b/spa_client/src/js/simple-example.js @@ -0,0 +1,128 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import { render } from 'react-dom' +import { connect } from 'react-redux' +import { createStore } from 'redux'; +import immutable from 'object-path-immutable'; +import { Provider } from 'react-redux' +import deepcopy from 'deepcopy'; + +// This is the default state of the application. Each +// application has only one state, which is an object +// with one or more properties. + +let defaultState = { + 'myButtonLabel': 'click' +} + +// The reducer is what processes the actions of the application, such as +// button clicks, text changes, etc. It takes a state and an action as +// input and must return a state. Important: the state must not be modified +// directly. Create a copy first (see `deepcopy`), modify it and return it. + +function reducer(state, action) { + switch (action.type) { + + case 'SET_BUTTON_NAME': + + var state = deepcopy(state); + state.myButtonLabel = action.name; + return state; + + } + + return state; +} + +// The store is what essentially links the reducer to the state. + +let store = createStore(reducer, defaultState) + +// Create the button and input components. Those are regular React components. + +class MyButton extends React.Component { + + render() { + return + } + +} + +class MyInput extends React.Component { + + render() { + return + } + +} + +// Create the connected components. A connected component (often called "container component") +// is a react component that has been connected to the application state. The connection +// happens by mapping the state properties to the component properties, and by mapping the +// dispatches to the component handlers. This allows better separating the view (React +// component) from the model/controller (state and actions). + +const mapStateToButtonProps = function(state) { + return { label: state.myButtonLabel }; +} + +const mapDispatchToButtonProps = function(dispatch) { + return { + onClick: function() { + alert('click'); + } + } +} + +const MyConnectedButton = connect( + mapStateToButtonProps, + mapDispatchToButtonProps +)(MyButton) + +const mapStateToInputProps = function(state) { + return {} +} + +const mapDispatchToInputProps = function(dispatch) { + return { + onKeyPress(e) { + if (e.key == 'Enter') { + dispatch({ + type: 'SET_BUTTON_NAME', + name: e.target.value + }); + } + } + } +} + +const MyConnectionInput = connect( + mapStateToInputProps, + mapDispatchToInputProps +)(MyInput) + +// Create the application. Note that we display the Connected components, +// which in turn include the Rect components. + +class App extends React.Component { + + render() { + return ( +
    + + +
    + ) + } + +} + +// Render the application via the tag. This is a special React-Redux +// component that "magically" links the store to the application and components. + +render( + + + , + document.getElementById('container') +) \ No newline at end of file diff --git a/spa_client/webpack.config.js b/spa_client/webpack.config.js new file mode 100755 index 000000000..bba55f322 --- /dev/null +++ b/spa_client/webpack.config.js @@ -0,0 +1,38 @@ +var path = require('path'); +var webpack = require('webpack'); + +module.exports = { + quiet: true, + entry: [ + './src/js/app.jsx' + ], + output: { + path: __dirname + '/dist/js/', + filename: 'app.js', + publicPath: '/js/' + }, + module: { + loaders: [{ + test: /\.(jsx|js)$/, + loaders: ['babel'], + include: path.join(__dirname, './src/js/') + }] + }, + resolve: { + alias: { + components: path.resolve(__dirname, './src/js/components'), + models: path.resolve(__dirname, './src/js/models'), + }, + }, + plugins: [ + // new webpack.optimize.UglifyJsPlugin({ + // minimize: true, + // compress: { + // warnings: false + // } + // }), + new webpack.DefinePlugin({ + 'process.env.NODE_ENV': '"development"' + }) + ] +}; diff --git a/spa_client/webpack.dev.config.js b/spa_client/webpack.dev.config.js new file mode 100755 index 000000000..e8750943d --- /dev/null +++ b/spa_client/webpack.dev.config.js @@ -0,0 +1,32 @@ +// NOT USED + +var path = require('path'); +var webpack = require('webpack'); + +module.exports = { + entry: [ + './src/js/app' + ], + target: 'web', + devtool: 'eval-source-map', + output: { + path: __dirname + '/src/js/', + filename: 'app.min.js', + publicPath: '/js/' + }, + module: { + loaders: [{ + test: /\.js$/, + loaders: ['babel'], + include: path.join(__dirname, './src/js/') + }] + }, + plugins: [ + new webpack.ProvidePlugin({ + 'Promise': 'es6-promise' + }), + new webpack.DefinePlugin({ + 'process.env.NODE_ENV': '"development"' + }) + ] +}; diff --git a/src/AppBundle/ApiSerializer.php b/src/AppBundle/ApiSerializer.php new file mode 100755 index 000000000..48cd10f61 --- /dev/null +++ b/src/AppBundle/ApiSerializer.php @@ -0,0 +1,9 @@ +setName('app:build-mime-type-array'); + $this->setDescription('Build MIME type PHP array from Apache mime.types file.'); + } + + protected function execute(InputInterface $input, OutputInterface $output) { + $paths = $this->getContainer()->get('app.paths'); + + $sourcePath = $paths->dataDir() . '/mime.types'; + $targetPath = $paths->dataDir() . '/mime_types.php'; + $sqlitePath = $paths->dataDir() . '/mime_types.sqlite.sql'; + + if (file_exists($targetPath)) { + // TODO: (or not) + // To update the existing PHP file, it needs to be loaded first and the IDs need to remain in place + // since they might be use in the database, etc., then any new type can be added. + // This is easy to implement, but most likely YAGNI. + throw new \Exception(sprintf('MimeType PHP file already exists at %s and the code to update it as not been implemented.', $targetPath)); + } + + $lines = file_get_contents($sourcePath); + if ($lines === false) throw new \Exception('Cannot read ' . $sourcePath); + $lines = explode("\n", $lines); + + $mimeTypes = array(); + $id = 1; + foreach ($lines as $line) { + $line = trim($line); + if (!$line) continue; + if ($line[0] == '#') continue; + $tokens = explode("\t", $line); + if (count($tokens) < 2) continue; + + $mimeType = trim($tokens[0]); + if (!$mimeType) continue; // Shouldn't happen + $extensions = explode(' ', $tokens[count($tokens) - 1]); + + $mimeTypes[$id] = array( + 'id' => $id, + 't' => $mimeType, + 'e' => $extensions, + ); + + $id++; + } + + // CREATE TABLE mimetypes ( + // id INT, + // mime TEXT + // ); + + // CREATE TABLE mimetype_extensions ( + // id INTEGER PRIMARY KEY, + // mimetype_id, + // extension TEXT + // ); + + // foreach ($mimeTypes[$id] + + $content = var_export($mimeTypes, true); + $content = str_replace(' ', '', $content); + $content = str_replace("\n", '', $content); + $content = str_replace(',)', ')', $content); + $content = 'writeln(sprintf('File created at "%s"', $targetPath)); + } + +} \ No newline at end of file diff --git a/src/AppBundle/Controller/ApiController.php b/src/AppBundle/Controller/ApiController.php index 887531c67..236dcb687 100755 --- a/src/AppBundle/Controller/ApiController.php +++ b/src/AppBundle/Controller/ApiController.php @@ -103,6 +103,11 @@ abstract class ApiController extends Controller { return $this->user; } + protected function userId() { + $u = $this->user(); + return $u ? $u->id : 0; + } + protected function aclCheck($resource) { if (!is_array($resource)) $resource = array($resource); $user = $this->user(); diff --git a/src/AppBundle/Controller/FilesController.php b/src/AppBundle/Controller/FilesController.php new file mode 100755 index 000000000..af826dd8b --- /dev/null +++ b/src/AppBundle/Controller/FilesController.php @@ -0,0 +1,61 @@ +isMethod('POST')) { + if (!isset($_FILES['file'])) throw new ValidationException('Missing "file" parameter'); + + $file = new File(); + $file->moveUploadedFile($_FILES['file']); + $file->owner_id = $this->userId(); + $file->save(); + + return static::successResponse($file); + } + + return static::errorResponse('Invalid method'); + } + + /** + * @Route("/files/{id}") + */ + public function oneAction($id, Request $request) { + $file = File::find(File::unhex($id)); + if (!$file) return static::errorResponse('Not found', 0, 404); + + if ($request->isMethod('GET')) { + return static::successResponse($file); + } + + if ($request->isMethod('PATCH')) { + $data = $this->patchParameters(); + foreach ($data as $n => $v) { + $file->{$n} = $v; + } + $file->save(); + return static::successResponse($file); + } + + if ($request->isMethod('DELETE')) { + $file->delete(); + return static::successResponse(); + } + + return static::errorResponse('Invalid method'); + } + +} diff --git a/src/AppBundle/Controller/UsersController.php b/src/AppBundle/Controller/UsersController.php index 6d8ebd431..a8aa9aa1c 100755 --- a/src/AppBundle/Controller/UsersController.php +++ b/src/AppBundle/Controller/UsersController.php @@ -9,7 +9,7 @@ use AppBundle\Controller\ApiController; use AppBundle\Model\User; use AppBundle\Model\Session; use AppBundle\Model\Change; -use AppBundle\Model\FolderItem; +use AppBundle\Model\BaseItem; use AppBundle\Exception\ValidationException; @@ -127,45 +127,45 @@ class UsersController extends ApiController { // var_dump($diff2); // $change = new Change(); - // $change->user_id = FolderItem::unhex('204705F2E2E698036034FDC709840B80'); - // $change->client_id = FolderItem::unhex('11111111111111111111111111111111'); - // $change->item_type = FolderItem::enumId('type', 'note'); - // $change->item_field = FolderItem::enumId('field', 'title'); - // $change->item_id = FolderItem::unhex('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'); + // $change->user_id = BaseItem::unhex('204705F2E2E698036034FDC709840B80'); + // $change->client_id = BaseItem::unhex('11111111111111111111111111111111'); + // $change->item_type = BaseItem::enumId('type', 'note'); + // $change->item_field = BaseItem::enumId('field', 'title'); + // $change->item_id = BaseItem::unhex('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'); // $change->delta = 'salut ca va'; // $change->save(); // $change = new Change(); - // $change->user_id = FolderItem::unhex('204705F2E2E698036034FDC709840B80'); - // $change->client_id = FolderItem::unhex('11111111111111111111111111111111'); - // $change->item_type = FolderItem::enumId('type', 'note'); - // $change->item_field = FolderItem::enumId('field', 'title'); - // $change->item_id = FolderItem::unhex('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'); + // $change->user_id = BaseItem::unhex('204705F2E2E698036034FDC709840B80'); + // $change->client_id = BaseItem::unhex('11111111111111111111111111111111'); + // $change->item_type = BaseItem::enumId('type', 'note'); + // $change->item_field = BaseItem::enumId('field', 'title'); + // $change->item_id = BaseItem::unhex('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'); // $change->createDelta('salut, ça va ? oui très bien'); // $change->save(); // $change = new Change(); - // $change->user_id = FolderItem::unhex('204705F2E2E698036034FDC709840B80'); - // $change->client_id = FolderItem::unhex('11111111111111111111111111111111'); - // $change->item_type = FolderItem::enumId('type', 'note'); - // $change->item_field = FolderItem::enumId('field', 'title'); - // $change->item_id = FolderItem::unhex('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'); + // $change->user_id = BaseItem::unhex('204705F2E2E698036034FDC709840B80'); + // $change->client_id = BaseItem::unhex('11111111111111111111111111111111'); + // $change->item_type = BaseItem::enumId('type', 'note'); + // $change->item_field = BaseItem::enumId('field', 'title'); + // $change->item_id = BaseItem::unhex('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'); // $change->createDelta('salut - oui très bien'); // $change->save(); // $change = new Change(); - // $change->user_id = FolderItem::unhex('204705F2E2E698036034FDC709840B80'); - // $change->client_id = FolderItem::unhex('11111111111111111111111111111111'); - // $change->item_type = FolderItem::enumId('type', 'note'); - // $change->item_field = FolderItem::enumId('field', 'title'); - // $change->item_id = FolderItem::unhex('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'); + // $change->user_id = BaseItem::unhex('204705F2E2E698036034FDC709840B80'); + // $change->client_id = BaseItem::unhex('11111111111111111111111111111111'); + // $change->item_type = BaseItem::enumId('type', 'note'); + // $change->item_field = BaseItem::enumId('field', 'title'); + // $change->item_id = BaseItem::unhex('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'); // $change->createDelta('salut, ça va ? oui bien'); // $change->save(); - $d = Change::fullFieldText(FolderItem::unhex('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'), FolderItem::enumId('field', 'title')); + $d = Change::fullFieldText(BaseItem::unhex('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'), BaseItem::enumId('field', 'title')); var_dump($d);die(); diff --git a/src/AppBundle/Eloquent.php b/src/AppBundle/Eloquent.php index 3c6bb2ba4..130985ad0 100755 --- a/src/AppBundle/Eloquent.php +++ b/src/AppBundle/Eloquent.php @@ -6,21 +6,26 @@ class Eloquent { private $capsule_ = null; - public function __construct() { + public function __construct($mimeTypes, $paths) { $this->capsule_ = new \Illuminate\Database\Capsule\Manager(); $this->capsule_->addConnection([ 'driver' => 'mysql', - 'host' => '127.0.0.1', + 'host' => 'localhost', 'database' => 'notes', 'username' => 'root', - 'password' => '', + 'password' => 'pass', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', ]); $this->capsule_->bootEloquent(); + + // In order to keep things lightweight, the models aren't part of Symfony dependency + // injection framework, so any service required by a model needs to be injected here. + Model\File::$mimeTypes = $mimeTypes; + Model\File::$paths = $paths; } public function connection() { diff --git a/src/AppBundle/MimeTypes.php b/src/AppBundle/MimeTypes.php new file mode 100755 index 000000000..0ed582192 --- /dev/null +++ b/src/AppBundle/MimeTypes.php @@ -0,0 +1,84 @@ +paths_ = $paths; + } + + // Get the mime type from the file extension, if any, or from + // the file content. The second check will be skipped if the + // file doesn't exists. + public function idFromPath($filePath) { + $ext = pathinfo($filePath, PATHINFO_EXTENSION); + $r = $this->extensionToMimeTypeId($ext); + if ($r !== $this->defaultMimeTypeId()) return $r; + + // Else try to get the mime type from the binary content + if (!file_exists($filePath)) return $this->defaultMimeTypeId(); + + $finfo = finfo_open(FILEINFO_MIME_TYPE); + $r = finfo_file($finfo, $filePath); + finfo_close($finfo); + return $r === false ? $this->defaultMimeTypeId() : $this->stringToId($r); + } + + private function loadMimeTypes() { + if ($this->mimeTypes_) return; + $path = $this->paths_->dataDir() . '/mime_types.php'; + if (!file_exists($path)) throw new \Exception(sprintf('File not found: "%s"', $path)); + $this->mimeTypes_ = require $path; + } + + public function defaultMimeTypeId() { + if ($this->defaultMimeTypeId_) return $this->defaultMimeTypeId_; + $this->loadMimeTypes(); + $this->defaultMimeTypeId_ = $this->stringToId($this->defaultMimeType_); + return $this->defaultMimeTypeId_; + } + + public function defaultMimeType() { + return $this->defaultMimeType_; + } + + public function idToString($id) { + $this->loadMimeTypes(); + $id = (int)$id; + if (!isset($this->mimeTypes_[$id])) throw new \Exception(sprintf('Invalid MIME type ID: %s', $id)); + return $this->mimeTypes_[$id]['t']; + } + + public function stringToId($mimeType) { + $this->loadMimeTypes(); + $mimeType = strtolower(trim($mimeType)); + if (!$mimeType) return $this->defaultMimeTypeId(); + + foreach ($this->mimeTypes_ as $id => $o) { + if ($o['t'] == $mimeType) return $id; + } + + return $this->defaultMimeTypeId(); + } + + private function extensionToMimeTypeId($ext) { + $this->loadMimeTypes(); + $ext = strtolower(trim($ext)); + if (!$ext) return $this->defaultMimeTypeId(); + + foreach ($this->mimeTypes_ as $id => $o) { + foreach ($o['e'] as $e) { + if ($ext == $e) return $id; + } + } + + return $this->defaultMimeTypeId(); + } + +} \ No newline at end of file diff --git a/src/AppBundle/Model/BaseItem.php b/src/AppBundle/Model/BaseItem.php new file mode 100755 index 000000000..8177a07f7 --- /dev/null +++ b/src/AppBundle/Model/BaseItem.php @@ -0,0 +1,45 @@ + array('folder', 'note', 'todo', 'tag'), + ); + + public function itemTypeId() { + $typeName = null; + switch (get_called_class()) { + case 'AppBundle\Model\Folder': + $typeName = 'folder'; + break; + case 'AppBundle\Model\Note': + $typeName = 'note'; + break; + case 'AppBundle\Model\Tag': + $typeName = 'tag'; + break; + } + + if (!$typeName) throw new \Exception('Unknown item class: ' . get_called_class()); + + return self::enumId('type', $typeName); + } + + static public function byId($itemTypeId, $itemId) { + if ($itemTypeId == BaseItem::enumId('type', 'folder')) { + return Folder::where('id', '=', $itemId)->first(); + } else if ($itemTypeId == BaseItem::enumId('type', 'note')) { + return Note::where('id', '=', $itemId)->first(); + } else if ($itemTypeId == BaseItem::enumId('type', 'tag')) { + return Tag::where('id', '=', $itemId)->first(); + } + + throw new \Exception('Unsupported item type: ' . $itemTypeId); + } + +} diff --git a/src/AppBundle/Model/BaseModel.php b/src/AppBundle/Model/BaseModel.php index 9f534aa1b..10a901a28 100755 --- a/src/AppBundle/Model/BaseModel.php +++ b/src/AppBundle/Model/BaseModel.php @@ -157,7 +157,7 @@ class BaseModel extends \Illuminate\Database\Eloquent\Model { } if (isset($output['item_type'])) { - $output['item_type'] = FolderItem::enumName('type', $output['item_type'], true); + $output['item_type'] = BaseItem::enumName('type', $output['item_type'], true); } if (isset($output['item_field'])) { @@ -311,8 +311,12 @@ class BaseModel extends \Illuminate\Database\Eloquent\Model { $this->isNew = $v; } + public function isNew() { + return !$this->id || $this->isNew === true; + } + public function save(Array $options = array()) { - $isNew = !$this->id || $this->isNew === true; + $isNew = $this->isNew(); if ($this->useUuid && $isNew && !$this->id) $this->id = self::createId(); $this->updated_time = time(); // TODO: maybe only update if one of the fields, or if some of versioned data has changed @@ -320,6 +324,8 @@ class BaseModel extends \Illuminate\Database\Eloquent\Model { parent::save($options); + $this->isNew = null; + if (count($this->versionedFields)) { $this->recordChanges($isNew ? 'create' : 'update', $this->changedVersionedFieldValues); } @@ -364,7 +370,7 @@ class BaseModel extends \Illuminate\Database\Eloquent\Model { $change = new Change(); $change->user_id = $this->owner_id; $change->client_id = static::clientId(); - $change->item_type = FolderItem::enumId('type', $this->classItemTypeName()); + $change->item_type = BaseItem::enumId('type', $this->classItemTypeName()); $change->type = Change::enumId('type', $type); $change->item_id = $this->id; return $change; diff --git a/src/AppBundle/Model/File.php b/src/AppBundle/Model/File.php new file mode 100755 index 000000000..b9c2b3069 --- /dev/null +++ b/src/AppBundle/Model/File.php @@ -0,0 +1,52 @@ +idToString($this->mime_type); + return $output; + } + + public function delete() { + @unlink($this->path()); + parent::delete(); + } + + public function path() { + return self::$paths->uploadsDir() . '/' . BaseModel::hex($this->id); + } + + static public function pathForId($id) { + return self::$paths->uploadsDir() . '/' . $id; + } + + public function moveUploadedFile($file) { + if (isset($file['error']) && $file['error']) throw new \Exception('Cannot upload file: ' . $file['error']); + + $filePath = $file['tmp_name']; + $originalName = $file['name']; + $id = BaseModel::createId(); + + $targetPath = self::$paths->uploadsDir() . '/' . BaseModel::hex($id); + if (file_exists($targetPath)) throw new \Exception('Hash collision'); // Shouldn't happen + + if (!@move_uploaded_file($filePath, $targetPath)) throw new \Exception('Unknown error - file could not be uploaded.'); + + $this->id = $id; + $this->title = $originalName; + $this->original_name = $originalName; + $this->mime_type = self::$mimeTypes->idFromPath($targetPath); + + $this->setIsNew(true); + } + +} diff --git a/src/AppBundle/Model/Folder.php b/src/AppBundle/Model/Folder.php index 661d1c2db..b0b209c79 100755 --- a/src/AppBundle/Model/Folder.php +++ b/src/AppBundle/Model/Folder.php @@ -2,7 +2,7 @@ namespace AppBundle\Model; -class Folder extends FolderItem { +class Folder extends BaseItem { protected $versionedFields = array('title'); diff --git a/src/AppBundle/Model/Note.php b/src/AppBundle/Model/Note.php index 50f6db26a..3ed79be2f 100755 --- a/src/AppBundle/Model/Note.php +++ b/src/AppBundle/Model/Note.php @@ -2,7 +2,7 @@ namespace AppBundle\Model; -class Note extends FolderItem { +class Note extends BaseItem { protected $versionedFields = array('title', 'body'); diff --git a/src/AppBundle/Model/Tag.php b/src/AppBundle/Model/Tag.php new file mode 100755 index 000000000..7abcc2f02 --- /dev/null +++ b/src/AppBundle/Model/Tag.php @@ -0,0 +1,78 @@ +where('title', '=', 'star') + ->first(); + + if (!$t) { + $t = new Tag(); + $t->title = 'star'; + $t->internal = 1; + $t->owner_id = $ownerId; + $t->save(); + } + + self::$starTag_ = $t; + return self::$starTag_; + } + + static public function star($item) { + self::starTag($item->owner_id)->add($item); + } + + static public function unstar($item) { + self::starTag($item->owner_id)->remove($item); + } + + static public function isStarred($item) { + return self::starTag($item->owner_id)->includes($item); + } + + static public function starredItems($ownerId) { + return self::starTag($ownerId)->items(); + } + + public function add($item) { + if ($this->includes($item)) return; + + $t = new Tagged_item(); + $t->tag_id = $this->id; + $t->item_id = $item->id; + $t->item_type = $item->itemTypeId(); + $t->save(); + } + + public function includes($item) { + return !!Tagged_item::where('item_type', '=', $item->itemTypeId()) + ->where('item_id', '=', $item->id) + ->first(); + } + + public function remove($item) { + Tagged_item::where('item_type', '=', $item->itemTypeId()) + ->where('item_id', '=', $item->id) + ->delete(); + } + + // TODO: retrieve items in one SQL query + public function items() { + $output = array(); + $taggedItems = Tagged_item::where('tag_id', '=', $this->id)->get(); + foreach ($taggedItems as $taggedItem) { + $item = BaseItem::byId($taggedItem->item_type, $taggedItem->item_id); + $output[] = $item; + } + return $output; + } + +} diff --git a/src/AppBundle/Model/Tagged_item.php b/src/AppBundle/Model/Tagged_item.php new file mode 100755 index 000000000..6f748c5a0 --- /dev/null +++ b/src/AppBundle/Model/Tagged_item.php @@ -0,0 +1,7 @@ +rootDir_ = $rootDir; + } + + public function rootDir() { + return $this->rootDir_; + } + + public function dataDir() { + return $this->rootDir() . '/data'; + } + + public function uploadsDir() { + return $this->dataDir() . '/uploads'; + } + +} \ No newline at end of file diff --git a/structure.sql b/structure.sql index 5eabc4237..729191581 100755 --- a/structure.sql +++ b/structure.sql @@ -6,7 +6,7 @@ CREATE TABLE `folders` ( `owner_id` binary(16) NULL default NULL, `is_encrypted` tinyint(1) NOT NULL default '0', `encryption_method` int(11) NOT NULL default '0', -PRIMARY KEY (`id`) + PRIMARY KEY (`id`) ) CHARACTER SET=utf8; CREATE TABLE `notes` ( @@ -14,11 +14,40 @@ CREATE TABLE `notes` ( `completed` tinyint(1) NOT NULL default '0', `created_time` int(11) NOT NULL default '0', `updated_time` int(11) NOT NULL default '0', + `latitude` DECIMAL(10, 8) NOT NULL default '0', + `longitude` DECIMAL(11, 8) NOT NULL default '0', + `altitude` DECIMAL(9, 4) NOT NULL default '0', `parent_id` binary(16) NULL default NULL, `owner_id` binary(16), `is_encrypted` tinyint(1) NOT NULL default '0', `encryption_method` int(11) NOT NULL default '0', -PRIMARY KEY (`id`) + `order` int(11) NOT NULL default '0', + `is_todo` tinyint(1) NOT NULL default '0', + `todo_due` int(11) NOT NULL default '0', + `todo_completed` int(11) NOT NULL default '0', + PRIMARY KEY (`id`) +) CHARACTER SET=utf8; + +CREATE TABLE `tags` ( + `id` binary(16) NOT NULL, + `title` varchar(1024) NOT NULL default '', + `owner_id` binary(16) NOT NULL, + `internal` tinyint(1) NOT NULL default '0', + `created_time` int(11) NOT NULL default '0', + `updated_time` int(11) NOT NULL default '0', + `is_encrypted` tinyint(1) NOT NULL default '0', + `encryption_method` int(11) NOT NULL default '0', + PRIMARY KEY (`id`) +) CHARACTER SET=utf8; + +CREATE TABLE `tagged_items` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `tag_id` binary(16) NOT NULL, + `item_id` binary(16) NOT NULL, + `item_type` int(11) NOT NULL, + `created_time` int(11) NOT NULL default '0', + `updated_time` int(11) NOT NULL default '0', + PRIMARY KEY (`id`) ) CHARACTER SET=utf8; CREATE TABLE `users` ( @@ -29,7 +58,7 @@ CREATE TABLE `users` ( `created_time` int(11) NOT NULL default '0', `updated_time` int(11) NOT NULL default '0', `owner_id` binary(16), -PRIMARY KEY (`id`) + PRIMARY KEY (`id`) ) CHARACTER SET=utf8; CREATE TABLE `sessions` ( @@ -38,7 +67,7 @@ CREATE TABLE `sessions` ( `client_id` binary(16), `created_time` int(11) NOT NULL default '0', `updated_time` int(11) NOT NULL default '0', -PRIMARY KEY (`id`) + PRIMARY KEY (`id`) ) CHARACTER SET=utf8; CREATE TABLE `changes` ( @@ -53,5 +82,18 @@ CREATE TABLE `changes` ( `item_field` int(11) NOT NULL default '0', `delta` MEDIUMTEXT, `previous_id` int(11) NOT NULL default '0', -PRIMARY KEY (`id`) + PRIMARY KEY (`id`) +) CHARACTER SET=utf8; + +CREATE TABLE `files` ( + `id` binary(16) NOT NULL, + `title` varchar(256) NOT NULL default '', + `mime_type` int(11) NOT NULL default '0', + `original_name` varchar(256) NOT NULL default '', + `created_time` int(11) NOT NULL default '0', + `updated_time` int(11) NOT NULL default '0', + `owner_id` binary(16) NULL default NULL, + `is_encrypted` tinyint(1) NOT NULL default '0', + `encryption_method` int(11) NOT NULL default '0', + PRIMARY KEY (`id`) ) CHARACTER SET=utf8; diff --git a/tests/AppBundle/Controller/DefaultControllerTest.php b/tests/AppBundle/Controller/DefaultControllerTest.php new file mode 100755 index 000000000..594803cce --- /dev/null +++ b/tests/AppBundle/Controller/DefaultControllerTest.php @@ -0,0 +1,18 @@ +request('GET', '/'); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + $this->assertContains('Welcome to Symfony', $crawler->filter('#container h1')->text()); + } +} diff --git a/tests/Model/BaseItemTest.php b/tests/Model/BaseItemTest.php new file mode 100755 index 000000000..01cf5bcf1 --- /dev/null +++ b/tests/Model/BaseItemTest.php @@ -0,0 +1,25 @@ +assertEquals(BaseItem::enumId('type', 'note'), $n->itemTypeId()); + $n = new Folder(); + $this->assertEquals(BaseItem::enumId('type', 'folder'), $n->itemTypeId()); + $n = new Tag(); + $this->assertEquals(BaseItem::enumId('type', 'tag'), $n->itemTypeId()); + } + +} \ No newline at end of file diff --git a/tests/Model/ChangeTest.php b/tests/Model/ChangeTest.php index e209f22ce..58ab67ed9 100755 --- a/tests/Model/ChangeTest.php +++ b/tests/Model/ChangeTest.php @@ -3,7 +3,7 @@ require_once dirname(dirname(__FILE__)) . '/setup.php'; use AppBundle\Model\BaseModel; -use AppBundle\Model\FolderItem; +use AppBundle\Model\BaseItem; use AppBundle\Model\Note; use AppBundle\Model\Change; @@ -24,7 +24,7 @@ class ChangeTest extends BaseTestCase { $change = new Change(); $change->user_id = $this->user()->id; $change->client_id = $this->clientId(); - $change->item_type = FolderItem::enumId('type', 'note'); + $change->item_type = BaseItem::enumId('type', 'note'); $change->item_field = BaseModel::enumId('field', 'body'); $change->type = Change::enumId('type', 'create'); $change->item_id = $itemId; @@ -36,7 +36,7 @@ class ChangeTest extends BaseTestCase { $change = new Change(); $change->user_id = $this->user()->id; $change->client_id = $this->clientId(); - $change->item_type = FolderItem::enumId('type', 'note'); + $change->item_type = BaseItem::enumId('type', 'note'); $change->item_field = BaseModel::enumId('field', 'body'); $change->type = Change::enumId('type', 'update'); $change->item_id = $itemId; @@ -62,7 +62,7 @@ class ChangeTest extends BaseTestCase { $change = new Change(); $change->user_id = $this->user()->id; $change->client_id = $this->clientId(1); - $change->item_type = FolderItem::enumId('type', 'note'); + $change->item_type = BaseItem::enumId('type', 'note'); $change->item_field = BaseModel::enumId('field', 'body'); $change->type = Change::enumId('type', 'create'); $change->item_id = $itemId; @@ -76,7 +76,7 @@ class ChangeTest extends BaseTestCase { $change = new Change(); $change->user_id = $this->user()->id; $change->client_id = $this->clientId(2); - $change->item_type = FolderItem::enumId('type', 'note'); + $change->item_type = BaseItem::enumId('type', 'note'); $change->item_field = BaseModel::enumId('field', 'body'); $change->type = Change::enumId('type', 'update'); $change->item_id = $itemId; @@ -91,7 +91,7 @@ class ChangeTest extends BaseTestCase { $change = new Change(); $change->user_id = $this->user()->id; $change->client_id = $this->clientId(1); - $change->item_type = FolderItem::enumId('type', 'note'); + $change->item_type = BaseItem::enumId('type', 'note'); $change->item_field = BaseModel::enumId('field', 'body'); $change->type = Change::enumId('type', 'update'); $change->item_id = $itemId; diff --git a/tests/Model/TagTest.php b/tests/Model/TagTest.php new file mode 100755 index 000000000..2ff60e472 --- /dev/null +++ b/tests/Model/TagTest.php @@ -0,0 +1,71 @@ +save(); + + $tag = new Tag(); + $tag->owner_id = $this->userId(); + $tag->save(); + + $this->assertFalse($tag->includes($note)); + + $tag->add($note); + $items = $tag->items(); + $this->assertEquals(1, count($items)); + + $tag->add($note); + $items = $tag->items(); + $this->assertEquals(1, count($items)); + + $note2 = new Note(); + $note2->save(); + + $tag->add($note2); + $items = $tag->items(); + $this->assertEquals(2, count($items)); + + $this->assertEquals($note->id, $items[0]->id); + $this->assertEquals($note2->id, $items[1]->id); + $this->assertTrue($tag->includes($note)); + $this->assertTrue($tag->includes($note2)); + + $tag->remove($note); + $items = $tag->items(); + $this->assertEquals(1, count($items)); + + $tag->remove($note2); + $items = $tag->items(); + $this->assertEquals(0, count($items)); + } + + public function testStarring() { + $note = new Note(); + $note->owner_id = $this->userId(); + $note->save(); + + $this->assertFalse(Tag::isStarred($note)); + + Tag::star($note); + $this->assertTrue(Tag::isStarred($note)); + $this->assertEquals(1, count(Tag::starredItems($this->userId()))); + + Tag::star($note); + $this->assertEquals(1, count(Tag::starredItems($this->userId()))); + + Tag::unstar($note); + $this->assertFalse(Tag::isStarred($note)); + } + +} \ No newline at end of file