mirror of
https://github.com/qwertyforce/scenery.git
synced 2025-05-31 11:42:35 +00:00
fix
This commit is contained in:
parent
630ff17f9f
commit
37240b682d
@ -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`, {
|
||||
|
@ -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"])
|
||||
|
Loading…
x
Reference in New Issue
Block a user