Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146521 | May 8,2018 10:01 AM UTC | Aug 7,2019 05:35 AM UTC | Angular - EJ 2 | 5 |
![]() |
Tags: PDF Viewer |
this.http.post(url, body, header)
<ejs-uploader #defaultupload (uploading)="onuploading($event)" (removing)="onremove($event)" [asyncSettings]='path'></ejs-uploader>
// To add the header in save Url
public onuploading(args: any) {
args.currentRequest.setRequestHeader('Authorization', ‘username’);
}
// To add header in remove Url
public onremove(args:any) {
args.currentRequest.setRequestHeader('Authorization', ‘username’);
}
|
[web.config]
<customHeaders>
<add name="Access-Control-Allow-Headers" value="accept, maxdataserviceversion, origin, x-requested-with, dataserviceversion,content-type, Authorization" />
…
</customHeaders> |
<ejs-uploader #chunkUpload [maxFileSize]=104857600 [autoUpload]=false (chunkUploading)="onChunkUploading($event)" (removing)="onRemove($event)" [asyncSettings]='path'></ejs-uploader>
// To add the header in save Url on every chunk upload
public onChunkUploading (args: any) {
args.currentRequest.setRequestHeader('Authorization', ‘username’);
}
// To add header in remove Url
public onRemove(args:any) {
args.currentRequest.setRequestHeader('Authorization', ‘username’);
}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.