Skip to content

Commit 505cd60

Browse files
committed
Read file from input
1 parent be71832 commit 505cd60

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/components/Readfile/Readfile.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ const ReadJSONYAMLfile:React.FC<ReadJSONYAMLfileType> = ({setContent, isMulipleF
129129
Drag and drop or
130130
</div>
131131
<label htmlFor='upload-api-spec'>
132-
<input id="upload-api-spec" type="file" accept="application/JSON, .yml, .yaml"></input>
132+
<input id="upload-api-spec" type="file" accept="application/JSON, .yml, .yaml" onChange={(e:any) => handleFileChosen(e.target.files[0])}></input>
133133
<span>choose your file</span>
134134
</label>
135135
</div>
@@ -144,7 +144,6 @@ const ReadJSONYAMLfile:React.FC<ReadJSONYAMLfileType> = ({setContent, isMulipleF
144144
<div className="select-file-wrapper">
145145
<div className="select-file">
146146
Selected "{fileName}"
147-
<>{console.log(fileType)}</>
148147
</div>
149148
<BsXCircle className="close-icon" onClick={closeFileOnclick} />
150149
</div>

0 commit comments

Comments
 (0)