Built motion from commit (unavailable).|2.5.15
[motion2.git] / server / api / attachment / index.js
index e1cbea4..aba5836 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x582b=['path','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./attachment.controller','get','isAuthenticated','index','show','/:id/download','/:id/clone','clone','diskStorage','join','root','server/files/attachments/','format','now','originalname','replace','post','single','create','/:id','update','delete','destroy','exports','util'];(function(_0x5d6c3e,_0x409a3e){var _0x44ecb7=function(_0x936b6a){while(--_0x936b6a){_0x5d6c3e['push'](_0x5d6c3e['shift']());}};_0x44ecb7(++_0x409a3e);}(_0x582b,0x185));var _0xb582=function(_0x47a90a,_0x5c3276){_0x47a90a=_0x47a90a-0x0;var _0x1557b0=_0x582b[_0x47a90a];return _0x1557b0;};'use strict';var multer=require('multer');var util=require(_0xb582('0x0'));var path=require(_0xb582('0x1'));var timeout=require('connect-timeout');var express=require(_0xb582('0x2'));var router=express['Router']();var auth=require(_0xb582('0x3'));var interaction=require(_0xb582('0x4'));var config=require(_0xb582('0x5'));var controller=require(_0xb582('0x6'));router[_0xb582('0x7')]('/',auth[_0xb582('0x8')](),controller[_0xb582('0x9')]);router[_0xb582('0x7')]('/:id',auth[_0xb582('0x8')](),controller[_0xb582('0xa')]);router['get'](_0xb582('0xb'),auth['isAuthenticated'](),controller['download']);router['post'](_0xb582('0xc'),auth[_0xb582('0x8')](),controller[_0xb582('0xd')]);var upload=multer({'storage':multer[_0xb582('0xe')]({'destination':function(_0x914dec,_0x36b8b2,_0x373cc4){_0x373cc4(null,path[_0xb582('0xf')](config[_0xb582('0x10')],_0xb582('0x11')));},'filename':function(_0x6409d5,_0x361e01,_0x593a8b){_0x593a8b(null,util[_0xb582('0x12')]('%s-%s',Date[_0xb582('0x13')](),_0x361e01[_0xb582('0x14')][_0xb582('0x15')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xb582('0x16')]('/',upload[_0xb582('0x17')]('file'),controller[_0xb582('0x18')]);router['put'](_0xb582('0x19'),auth[_0xb582('0x8')](),controller[_0xb582('0x1a')]);router[_0xb582('0x1b')](_0xb582('0x19'),auth[_0xb582('0x8')](),controller[_0xb582('0x1c')]);module[_0xb582('0x1d')]=router;
\ No newline at end of file
+var _0x21ab=['util','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./attachment.controller','get','index','show','/:id/download','isAuthenticated','download','post','/:id/clone','clone','diskStorage','join','root','server/files/attachments/','format','now','file','create','put','/:id','update','exports'];(function(_0x2fffb7,_0x3783e){var _0x5ecaf4=function(_0x46d9a2){while(--_0x46d9a2){_0x2fffb7['push'](_0x2fffb7['shift']());}};_0x5ecaf4(++_0x3783e);}(_0x21ab,0x16c));var _0xb21a=function(_0x124728,_0x463dca){_0x124728=_0x124728-0x0;var _0x8eb20f=_0x21ab[_0x124728];return _0x8eb20f;};'use strict';var multer=require('multer');var util=require(_0xb21a('0x0'));var path=require('path');var timeout=require(_0xb21a('0x1'));var express=require(_0xb21a('0x2'));var router=express[_0xb21a('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0xb21a('0x4'));var config=require(_0xb21a('0x5'));var controller=require(_0xb21a('0x6'));router[_0xb21a('0x7')]('/',auth['isAuthenticated'](),controller[_0xb21a('0x8')]);router[_0xb21a('0x7')]('/:id',auth['isAuthenticated'](),controller[_0xb21a('0x9')]);router['get'](_0xb21a('0xa'),auth[_0xb21a('0xb')](),controller[_0xb21a('0xc')]);router[_0xb21a('0xd')](_0xb21a('0xe'),auth[_0xb21a('0xb')](),controller[_0xb21a('0xf')]);var upload=multer({'storage':multer[_0xb21a('0x10')]({'destination':function(_0x139ce7,_0x3bec53,_0x2da0f8){_0x2da0f8(null,path[_0xb21a('0x11')](config[_0xb21a('0x12')],_0xb21a('0x13')));},'filename':function(_0x486620,_0x50af1d,_0x509c98){_0x509c98(null,util[_0xb21a('0x14')]('%s-%s',Date[_0xb21a('0x15')](),_0x50af1d['originalname']['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xb21a('0xd')]('/',upload['single'](_0xb21a('0x16')),controller[_0xb21a('0x17')]);router[_0xb21a('0x18')](_0xb21a('0x19'),auth[_0xb21a('0xb')](),controller[_0xb21a('0x1a')]);router['delete'](_0xb21a('0x19'),auth[_0xb21a('0xb')](),controller['destroy']);module[_0xb21a('0x1b')]=router;
\ No newline at end of file