diff --git a/src/pages/form-page.jsx b/src/pages/form-page.jsx index 88200ab..04fa155 100644 --- a/src/pages/form-page.jsx +++ b/src/pages/form-page.jsx @@ -16,9 +16,19 @@ function FormPage (){ }; const changeHandler = async(event) => { - // if (event.target.files[0]) - // { - + if (event.target.files[0]) + { + const data = new FormData(); + data.append("file", event.target.files[0], event.target.files[0].name); + data.append("isSync", true); + const res = await starton.post('/ipfs/file', + data, { + headers: { + "x-api-key": 'sk_live_89c7396e-c994-415e-9127-8bb3f7b8a7d4', + "Content-Type": "multipart/form-data"}, + }) + console.log(res.data); + } // let reader = new FileReader(); // reader.readAsDataURL(event.target.files[0]); // reader.onload = () => { @@ -31,30 +41,18 @@ function FormPage (){ // console.log(response.data); // }) // } - // } - // console.log(typeof event.target.files[0]) // // console.log(event.target.files[0]); // const file1 = new Buffer.from(JSON.stringify(event.target.files[0])); // console.log(file1); // // const file1 = await toBase64(event.target.files[0]); - const data = new FormData(); - data.append("file", event.target.files[0], event.target.files[0].name); - data.append("isSync", true); - const res = await starton.post('/ipfs/file', - data, { - headers: { - "x-api-key": 'sk_live_89c7396e-c994-415e-9127-8bb3f7b8a7d4', - "Content-Type": "multipart/form-data"}, - }) - console.log(res.data); }; return ( <>
-

- PAYCONSENT. +

+ PAYCONSENT.

@@ -67,18 +65,18 @@ function FormPage (){
-
@@ -86,7 +84,7 @@ function FormPage (){
-
-
-
- +

(Quotation, Specifications ...)

-
- +
+
-
diff --git a/src/pages/main-page.jsx b/src/pages/main-page.jsx index f5e68ef..a12ed3e 100644 --- a/src/pages/main-page.jsx +++ b/src/pages/main-page.jsx @@ -7,17 +7,17 @@ import "../assets/css/home.css"; class MainPage extends Component { render() { return ( -
+
-

- PAYCONSENT. +

+ PAYCONSENT.

-
-

+
+

Giving You Solutions

For Smarter Contracts

- + Are you tired of complex and slow administration ?

Get your first decentralized contract, entirely

managed with blockchain technology