From 33a16640ed2b647f4231e635a3eb1326b4ed5b0c Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 13 Feb 2020 15:31:49 -0500 Subject: [PATCH] add image sample and remove axios-curlirize --- .../src/components/HomeSamples/HomeSamples.js | 2 +- packages/siaviewnode-server/package.json | 1 - packages/siaviewnode-server/src/main.ts | 23 ------------------- yarn.lock | 5 ---- 4 files changed, 1 insertion(+), 30 deletions(-) diff --git a/packages/sia-skynet/src/components/HomeSamples/HomeSamples.js b/packages/sia-skynet/src/components/HomeSamples/HomeSamples.js index f5ec58ab..ca41b954 100644 --- a/packages/sia-skynet/src/components/HomeSamples/HomeSamples.js +++ b/packages/sia-skynet/src/components/HomeSamples/HomeSamples.js @@ -8,7 +8,7 @@ import { Sample } from "../"; const samples = [ { type: "HTML", url: "#" }, { type: "PDF", url: "/samples/sample.pdf" }, - { type: "Image", url: "#" }, + { type: "Image", url: "/samples/sample.pdf" }, { type: "Audio", url: "#" }, { type: "Video", url: "#" }, { type: "JSON", url: "#" }, diff --git a/packages/siaviewnode-server/package.json b/packages/siaviewnode-server/package.json index d7752217..70eca3ea 100644 --- a/packages/siaviewnode-server/package.json +++ b/packages/siaviewnode-server/package.json @@ -18,7 +18,6 @@ "@types/winston": "^2.4.4", "awesome-typescript-loader": "^5.2.1", "axios": "0.19.0", - "axios-curlirize": "^1.3.4", "axios-logger": "^2.3.0", "backpack-core": "^0.8.4", "cors": "2.8.5", diff --git a/packages/siaviewnode-server/src/main.ts b/packages/siaviewnode-server/src/main.ts index 7faab6d0..437d299b 100644 --- a/packages/siaviewnode-server/src/main.ts +++ b/packages/siaviewnode-server/src/main.ts @@ -1,5 +1,4 @@ import axios from "axios" -import curlirize from 'axios-curlirize'; import cors from "cors" import express, { Request, Response } from "express" import fileUpload, { UploadedFile } from "express-fileupload" @@ -13,26 +12,6 @@ import shortid from "shortid" import { Logger } from "winston" 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 SIAD_ENDPOINT = "http://localhost:9980" @@ -49,8 +28,6 @@ const siad = axios.create({ } }) -curlirize(siad); - // Ramda shared utility functions const selectFile = R.path(["files", "file"]) const pName = R.prop("name") diff --git a/yarn.lock b/yarn.lock index 6e224ebf..c66924e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2815,11 +2815,6 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.0.tgz#24390e6ad61386b0a747265754d2a17219de862c" 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: version "2.3.0" resolved "https://registry.yarnpkg.com/axios-logger/-/axios-logger-2.3.0.tgz#7c7b0891f71e691d72ef5ab143f2921fedec5196"