Built motion from commit 14588770.|2.5.38
[motion2.git] / server / api / attachment / index.js
index 985ac80..ace9f2d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x13b6=['now','originalname','replace','single','file','create','put','/:id','update','delete','exports','multer','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./attachment.controller','isAuthenticated','index','get','download','post','/:id/clone','clone','join','%s-%s'];(function(_0x564821,_0x4d037e){var _0x2b604d=function(_0x26fabf){while(--_0x26fabf){_0x564821['push'](_0x564821['shift']());}};_0x2b604d(++_0x4d037e);}(_0x13b6,0x97));var _0x613b=function(_0x3804d4,_0x89cff3){_0x3804d4=_0x3804d4-0x0;var _0x3c3cca=_0x13b6[_0x3804d4];return _0x3c3cca;};'use strict';var multer=require(_0x613b('0x0'));var util=require('util');var path=require(_0x613b('0x1'));var timeout=require(_0x613b('0x2'));var express=require(_0x613b('0x3'));var router=express[_0x613b('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x613b('0x5'));var config=require(_0x613b('0x6'));var controller=require(_0x613b('0x7'));router['get']('/',auth[_0x613b('0x8')](),controller[_0x613b('0x9')]);router[_0x613b('0xa')]('/:id',auth[_0x613b('0x8')](),controller['show']);router[_0x613b('0xa')]('/:id/download',auth['isAuthenticated'](),controller[_0x613b('0xb')]);router[_0x613b('0xc')](_0x613b('0xd'),auth[_0x613b('0x8')](),controller[_0x613b('0xe')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x51a45f,_0x2aaa78,_0x5b0b53){_0x5b0b53(null,path[_0x613b('0xf')](config['root'],'server/files/attachments/'));},'filename':function(_0x2f6cd6,_0x408b5f,_0x1567cd){_0x1567cd(null,util['format'](_0x613b('0x10'),Date[_0x613b('0x11')](),_0x408b5f[_0x613b('0x12')][_0x613b('0x13')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x613b('0xc')]('/',upload[_0x613b('0x14')](_0x613b('0x15')),controller[_0x613b('0x16')]);router[_0x613b('0x17')](_0x613b('0x18'),auth['isAuthenticated'](),controller[_0x613b('0x19')]);router[_0x613b('0x1a')](_0x613b('0x18'),auth['isAuthenticated'](),controller['destroy']);module[_0x613b('0x1b')]=router;
\ No newline at end of file
+var _0xb10b=['originalname','replace','single','file','create','put','/:id','update','destroy','exports','multer','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./attachment.controller','get','index','isAuthenticated','show','/:id/download','download','post','/:id/clone','diskStorage','join','server/files/attachments/','format','%s-%s'];(function(_0x3c51ae,_0x1e28ef){var _0x4b01af=function(_0x176b48){while(--_0x176b48){_0x3c51ae['push'](_0x3c51ae['shift']());}};_0x4b01af(++_0x1e28ef);}(_0xb10b,0x12a));var _0xbb10=function(_0x3700fd,_0x5bd346){_0x3700fd=_0x3700fd-0x0;var _0x4ffb6c=_0xb10b[_0x3700fd];return _0x4ffb6c;};'use strict';var multer=require(_0xbb10('0x0'));var util=require('util');var path=require(_0xbb10('0x1'));var timeout=require(_0xbb10('0x2'));var express=require(_0xbb10('0x3'));var router=express['Router']();var fs_extra=require(_0xbb10('0x4'));var auth=require(_0xbb10('0x5'));var interaction=require(_0xbb10('0x6'));var config=require(_0xbb10('0x7'));var controller=require(_0xbb10('0x8'));router[_0xbb10('0x9')]('/',auth['isAuthenticated'](),controller[_0xbb10('0xa')]);router[_0xbb10('0x9')]('/:id',auth[_0xbb10('0xb')](),controller[_0xbb10('0xc')]);router[_0xbb10('0x9')](_0xbb10('0xd'),auth[_0xbb10('0xb')](),controller[_0xbb10('0xe')]);router[_0xbb10('0xf')](_0xbb10('0x10'),auth['isAuthenticated'](),controller['clone']);var upload=multer({'storage':multer[_0xbb10('0x11')]({'destination':function(_0x118a74,_0xce64f3,_0x5e136d){_0x5e136d(null,path[_0xbb10('0x12')](config['root'],_0xbb10('0x13')));},'filename':function(_0x916a32,_0x285009,_0x193a27){_0x193a27(null,util[_0xbb10('0x14')](_0xbb10('0x15'),Date['now'](),_0x285009[_0xbb10('0x16')][_0xbb10('0x17')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xbb10('0xf')]('/',upload[_0xbb10('0x18')](_0xbb10('0x19')),controller[_0xbb10('0x1a')]);router[_0xbb10('0x1b')](_0xbb10('0x1c'),auth[_0xbb10('0xb')](),controller[_0xbb10('0x1d')]);router['delete'](_0xbb10('0x1c'),auth[_0xbb10('0xb')](),controller[_0xbb10('0x1e')]);module[_0xbb10('0x1f')]=router;
\ No newline at end of file