add image sample and remove axios-curlirize

This commit is contained in:
Karol Wypchlo 2020-02-13 15:31:49 -05:00
parent 98471291c0
commit 33a16640ed
4 changed files with 1 additions and 30 deletions

View File

@ -8,7 +8,7 @@ import { Sample } from "../";
const samples = [ const samples = [
{ type: "HTML", url: "#" }, { type: "HTML", url: "#" },
{ type: "PDF", url: "/samples/sample.pdf" }, { type: "PDF", url: "/samples/sample.pdf" },
{ type: "Image", url: "#" }, { type: "Image", url: "/samples/sample.pdf" },
{ type: "Audio", url: "#" }, { type: "Audio", url: "#" },
{ type: "Video", url: "#" }, { type: "Video", url: "#" },
{ type: "JSON", url: "#" }, { type: "JSON", url: "#" },

View File

@ -18,7 +18,6 @@
"@types/winston": "^2.4.4", "@types/winston": "^2.4.4",
"awesome-typescript-loader": "^5.2.1", "awesome-typescript-loader": "^5.2.1",
"axios": "0.19.0", "axios": "0.19.0",
"axios-curlirize": "^1.3.4",
"axios-logger": "^2.3.0", "axios-logger": "^2.3.0",
"backpack-core": "^0.8.4", "backpack-core": "^0.8.4",
"cors": "2.8.5", "cors": "2.8.5",

View File

@ -1,5 +1,4 @@
import axios from "axios" import axios from "axios"
import curlirize from 'axios-curlirize';
import cors from "cors" import cors from "cors"
import express, { Request, Response } from "express" import express, { Request, Response } from "express"
import fileUpload, { UploadedFile } from "express-fileupload" import fileUpload, { UploadedFile } from "express-fileupload"
@ -13,26 +12,6 @@ import shortid from "shortid"
import { Logger } from "winston" import { Logger } from "winston"
import logger from "./logger" import logger from "./logger"
curlirize(axios);
// import * as AxiosLogger from 'axios-logger'
// AxiosLogger.setGlobalConfig({
// prefixText: 'your prefix',
// dateFormat: 'HH:MM:ss',
// status: true,
// headers: false,
// data: false
// });
// // add interceptors
// siad.interceptors.request.use(
// AxiosLogger.requestLogger,
// AxiosLogger.errorLogger
// );
// siad.interceptors.response.use(
// AxiosLogger.responseLogger,
// AxiosLogger.errorLogger
// );
const MAX_UPLOAD_FILESIZE = 1000 * 1024 * 1024 const MAX_UPLOAD_FILESIZE = 1000 * 1024 * 1024
const SIAD_ENDPOINT = "http://localhost:9980" const SIAD_ENDPOINT = "http://localhost:9980"
@ -49,8 +28,6 @@ const siad = axios.create({
} }
}) })
curlirize(siad);
// Ramda shared utility functions // Ramda shared utility functions
const selectFile = R.path(["files", "file"]) const selectFile = R.path(["files", "file"])
const pName = R.prop("name") const pName = R.prop("name")

View File

@ -2815,11 +2815,6 @@ aws4@^1.8.0:
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.0.tgz#24390e6ad61386b0a747265754d2a17219de862c" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.0.tgz#24390e6ad61386b0a747265754d2a17219de862c"
integrity sha512-Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A== integrity sha512-Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A==
axios-curlirize@^1.3.4:
version "1.3.4"
resolved "https://registry.yarnpkg.com/axios-curlirize/-/axios-curlirize-1.3.4.tgz#399ca88e2e4a3f39aefe9fd81576c4bb2124e872"
integrity sha512-IxZqHdzKZcPFye1B7saIXcs7zbObRCLNBQWKC+tCQgxl0K57XRosejWDdeVYf00LeLp0SVMZNel2GzL3XPFe1g==
axios-logger@^2.3.0: axios-logger@^2.3.0:
version "2.3.0" version "2.3.0"
resolved "https://registry.yarnpkg.com/axios-logger/-/axios-logger-2.3.0.tgz#7c7b0891f71e691d72ef5ab143f2921fedec5196" resolved "https://registry.yarnpkg.com/axios-logger/-/axios-logger-2.3.0.tgz#7c7b0891f71e691d72ef5ab143f2921fedec5196"