I am not a native English speaker, so sorry if my English is bad. I am new to Angular and I'm trying to create a file upload button that would allow the user to upload a file according to a dropdown list of options (for example USA States). When the user uploads the file, the file will be saved to a folder in an API. I haven't found a tutorial on the web for something like this. Any idea?
Asked
Active
Viewed 417 times
0
-
See this answer: https://stackoverflow.com/a/47938117/12914833. Official tutorial: https://blog.angular-university.io/angular-file-upload/ – Chris Hamilton Jun 16 '22 at 02:28
-
Have a look on this, it's really useful and informative. https://www.ahmedbouchefra.com/angular-tutorial-example-upload-files-with-formdata-httpclient-rxjs-and-material-progressbar/ – Sunny Vakil Jun 16 '22 at 03:13
1 Answers
0
maybe ican help you using HTML and css
<label class="custom-file-upload">
<input type="file" id="file" (change)="uploadRca($event)"/>Upload
</label>
input[type="file"] {
display: none;
}
.custom-file-upload {
border: 1px solid #ccc;
display: inline-block;
padding: 5px 12px;
cursor: pointer;
place-self: center;
border-radius: 10px;
}

ilham doang
- 109
- 6