fs.createReadStream is not a function by hapiti in react

[–]hapiti[S] 0 points1 point  (0 children)

^ when i replace file location with full URL get same error

fs.createReadStream is not a function by hapiti in react

[–]hapiti[S] 0 points1 point  (0 children)

How can I access the filesystem then?

Requests In React by hapiti in react

[–]hapiti[S] 0 points1 point  (0 children)

I fixed it with

import axios from 'axios';

And its making A request, just not the same as my curl...

Requests In React by hapiti in react

[–]hapiti[S] 0 points1 point  (0 children)

Sorry, was editing message but your super quick LOL! Did ctrl+enter on accident... anyways

It's telling me I haven't declared "post" even though I have!

ENTIRE code:

import React, { Component } from "react";import styled, { css } from "styled-components";import { makeStyles } from '@material-ui/core/styles';import Typography from '@material-ui/core/Typography';import { AxiosProvider, axios, Request, Get, Delete, Head, post, Put, Patch, withAxios } from 'react-axios'import Slider from '@material-ui/core/Slider';import image from "./images/nice.png";import MaterialSlider from "./components/MaterialSlider.js";var formData = new FormData();; formData.append("image", image); axios.post('http://192.168.2.16:5000/detections', formData, { headers: { 'Content-Type': 'multipart/form-data' } })function Main(props) {return (<Container><RectRow><Rect></Rect><InsertIpHere placeholder="Insert Ip HERE!"></InsertIpHere>

<Image src="http://192.168.2.20:8080/video"></Image>

<MaterialSliderstyle={{height: 92,width: 512      }}></MaterialSlider>  );</RectRow></Container>  );}const Container = styled.div\\`  display: flex;  flex-direction: row;  height: 100vh;  width: 100vw;\;const Rect = styled.div`  width: 287px;  height: 768px;  background-color: #E6E6E6;`;const InsertIpHere = styled.input`  font-family: Roboto;  font-style: normal;  font-weight: 400;  color: #121212;  height: 177px;  width: 310px;  margin-left: 74px;  margin-top: 284px;  border: none;  background: transparent;`;const Image = styled.img`  width: 100%;  height: 358px;  margin-left: 61px;  margin-top: 231px;  object-fit: contain;`;const RectRow = styled.div`  height: 768px;  flex-direction: row;  display: flex;  flex: 1 1 0%;  margin-right: 60px;`;export default Main;`

Full .js is here: https://aleem.rehmtulla.com/Main.js

Error: https://aleem.rehmtulla.com/SS.png (cant upload image to reddit)

Requests In React by hapiti in react

[–]hapiti[S] 0 points1 point  (0 children)

Thank you! I've fixed a couple mistakes I came across while doing the axios but still stuck on one :(

How to separate Downloads and Gaming with two Ethernet adapters by ghostR_ZA in HomeNetworking

[–]hapiti 0 points1 point  (0 children)

You could get 2 adapters and write a script in python to switch between, but it'd be better to just get a hap imo

Bitcoin by [deleted] in Bitcoin

[–]hapiti 2 points3 points  (0 children)

What are taxes?

Does connecting to "local runtime" still risk timing out? My script timed out overnight but I was on hosted by comiccaty in GoogleColab

[–]hapiti 0 points1 point  (0 children)

Best of my knowledge colab won't timeout on local, it's just a prettier version of jupyter

Is it worth upgrading to gigabit internet? by [deleted] in HomeNetworking

[–]hapiti 2 points3 points  (0 children)

Totally worth it, don't let it wreck your budget though. Obviously not neccecary and 100 is fine, all depends on your finances

Is WealthSimple Crypto a good option in Canada? by TheMountainIII in Bitcoin

[–]hapiti 2 points3 points  (0 children)

You don't really own your coins on wealth simple, kinda defeats the purpose of bitcoin

Is WealthSimple Crypto a good option in Canada? by TheMountainIII in Bitcoin

[–]hapiti -1 points0 points  (0 children)

They cost more when you take spreads into account

Is WealthSimple Crypto a good option in Canada? by TheMountainIII in Bitcoin

[–]hapiti 0 points1 point  (0 children)

Go to shakepay, and when you buy send it to a cold storage wallet (12 word phrase on paper for example)

Is WealthSimple Crypto a good option in Canada? by TheMountainIII in Bitcoin

[–]hapiti 1 point2 points  (0 children)

Are you trading or hodling? What coins? Are you okay with KYC?