Angular 2+ upload file through api

1
2
uploadFile(fileToSend: File) : Observable<boolean> {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Upload a File through API

Assuming we are calling a api post route with 'file' argument passing through [FromForm]
and returning a boolean value (success/failure)

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.