Created
April 24, 2022 17:13
-
-
Save senoritadeveloper01/f23323536483de94cdfdfa72104d0e15 to your computer and use it in GitHub Desktop.
File Upload Process Http Parameters (Angular)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uploadFile(fileInfo: any): Observable<any> { | |
const headers: HttpHeaders = new HttpHeaders({ | |
'Accept': 'application/json', | |
'Content-Type': fileInfo.file.type, | |
'X-Meta-Strategy': '1', | |
'X-File-Size-Sig': fileInfo.signature | |
}); | |
return this.http.put(fileInfo.url, fileInfo.file, { | |
headers: headers, | |
reportProgress: true, | |
observe: 'events' | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment