This commit is contained in:
qwertyforce 2020-12-14 21:18:10 +03:00
parent 630ff17f9f
commit 37240b682d
2 changed files with 2 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import React, { useEffect, useState } from 'react';
import React, { useState } from 'react';
import Box from '@material-ui/core/Box';
import AppBar from '../components/AppBar'
import { DropzoneAreaBase } from 'material-ui-dropzone';
@ -45,7 +45,7 @@ export default function ReverseSearch() {
const send_image = (token: string,mode:string) => {
setOpen(true)
const formData = new FormData();
formData.append("image", fileObjects[0].file);
formData.append("image", (fileObjects[0] as any).file);
formData.append("g-recaptcha-response", token);
formData.append("mode", mode);
axios(`${config.reverse_search_url}/reverse_search`, {

View File

@ -32,7 +32,6 @@ async function proxy_get_image(req:Request,res:Response) {
try{
const resp= await axios.head(image_url)
const headers=resp.headers
console.log(headers)
if(allowed.includes(headers["content-type"])){
if(headers["content-length"]){
const size=parseInt(headers["content-length"])