X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-demo.git;a=blobdiff_plain;f=afm-client%2Fapp%2FBackend%2FRestApis%2FPostMockApi.js;fp=afm-client%2Fapp%2FBackend%2FRestApis%2FPostMockApi.js;h=0000000000000000000000000000000000000000;hp=7bc71f72498f896ddcb63450a7be688dfb357b34;hb=96190f9cd583d9182c692c88d3342109bad81157;hpb=922b183f441a6e68b55592596fa62cc6e1814f74
diff --git a/afm-client/app/Backend/RestApis/PostMockApi.js b/afm-client/app/Backend/RestApis/PostMockApi.js
deleted file mode 100644
index 7bc71f7..0000000
--- a/afm-client/app/Backend/RestApis/PostMockApi.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2015 "IoT.bzh"
- * Author "Fulup Ar Foll"
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- *
- * References: https://github.com/expressjs/multer
- */
-
-var fs = require('fs');
-var multer = require('multer');
-
-function NewApi(handle, prefix) {
- var scope=this; // make sure not to loose object context in async callback
-
- // defined upload directory and check it's a valid one
- var upload = multer({ dest: handle.config.UPLOAD_DIR});
- // WARNING: single('avatar') should match with
- handle.app.post(prefix +'/upload-image', upload.any(), function (req, res) {
-
- handle.trace (scope, 1, "%s/upload file=%s dest=%s/%s", prefix, req.files[0].originalname, req.files[0].destination, req.files[0].filename);
- res.send({"jtype": "TEST_message", "status": "success", "info": "done"});
- });
-
- // WARNING: single('music') should match with
- handle.app.post(prefix +'/upload-music', upload.any(), function (req, res) {
-
- handle.trace (scope, 1, "%s/upload file=%s dest=%s/%s", prefix, req.files[0].originalname, req.files[0].destination, req.files[0].filename);
- res.send({"jtype": "TEST_message", "status": "success", "info": "done"});
- });
-
- // WARNING: single('appli') should match with
- handle.app.post(prefix +'/upload-appli', upload.any(), function (req, res) {
-
- handle.trace (scope, 1, "%s/upload file=%s dest=%s/%s", prefix, req.files[0].originalname, req.files[0].destination, req.files[0].filename);
- res.send({"jtype": "TEST_message", "status": "success", "info": "done"});
- });
-
-}
-
-// Export Class
-module.exports = NewApi;
\ No newline at end of file