|
|
@ -6,6 +6,7 @@ export default class UploadDesign1 extends Component { |
|
|
|
state = { |
|
|
|
state = { |
|
|
|
uploadPercentage: 0, |
|
|
|
uploadPercentage: 0, |
|
|
|
avatar: "", |
|
|
|
avatar: "", |
|
|
|
|
|
|
|
fileName: "", |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
UploadDesign1 = ({ target: { files } }) => { |
|
|
|
UploadDesign1 = ({ target: { files } }) => { |
|
|
@ -47,7 +48,10 @@ export default class UploadDesign1 extends Component { |
|
|
|
<div className=""> |
|
|
|
<div className=""> |
|
|
|
<img src="images/UploadFilefile.svg" className="" alt="" /> |
|
|
|
<img src="images/UploadFilefile.svg" className="" alt="" /> |
|
|
|
<input |
|
|
|
<input |
|
|
|
onChange={this.uploadFile} |
|
|
|
onChange={(e) => { |
|
|
|
|
|
|
|
this.setState({ fileName: e.target.files[0].name }); |
|
|
|
|
|
|
|
this.uploadFile(); |
|
|
|
|
|
|
|
}} |
|
|
|
type="file" |
|
|
|
type="file" |
|
|
|
className="opacity-0 absolute top-[39%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-20 cursor-pointer" |
|
|
|
className="opacity-0 absolute top-[39%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-20 cursor-pointer" |
|
|
|
name="" |
|
|
|
name="" |
|
|
@ -91,6 +95,7 @@ export default class UploadDesign1 extends Component { |
|
|
|
className={`bg-[#68A8E6] h-3 rounded duration-500 w-72`} |
|
|
|
className={`bg-[#68A8E6] h-3 rounded duration-500 w-72`} |
|
|
|
></div> |
|
|
|
></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<p className="bg-red-400">{this.state.fileName}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|