upload job files
This commit is contained in:
@@ -241,7 +241,7 @@ export class ActivetaskPage implements OnInit {
|
||||
action:number,
|
||||
member_id: number,
|
||||
uid: string,
|
||||
family_uid: string,
|
||||
contract: string,
|
||||
sessionid: string,
|
||||
msg_type:'FILE',
|
||||
file_name: string,
|
||||
@@ -271,27 +271,30 @@ export class ActivetaskPage implements OnInit {
|
||||
//debugger;
|
||||
//image.base64String
|
||||
this.uploadData={
|
||||
action:11305,
|
||||
action:14010,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
family_uid: 'FAKE',
|
||||
contract: this.jobData.contract,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
msg_type:'FILE',
|
||||
file_name: `family-banner.${image.format}`,
|
||||
file_name: `${this.jobData.contract}-job.${image.format}`,
|
||||
file_size: file_size ,
|
||||
file_type: `image/${image.format}`,
|
||||
file_data: image.base64String
|
||||
};
|
||||
//console.log(image);
|
||||
// console.log(this.uploadData);
|
||||
loading.present();
|
||||
// this.wrenchService.uploadFile(this.uploadData).subscribe(
|
||||
// uploadResult => {
|
||||
// this.uploadResult = uploadResult;
|
||||
// console.log("this.wrenchService.uploadFile RETURN DATA->", this.uploadResult);
|
||||
// }
|
||||
// );
|
||||
this.wrenchService.uploadFile(this.uploadData).subscribe(
|
||||
uploadResult => {
|
||||
this.uploadResult = uploadResult;
|
||||
console.log("this.wrenchService.uploadFile RETURN DATA->", this.uploadResult);
|
||||
const event = new Event("app-taskactivities-refresh");
|
||||
// Dispatch the event.
|
||||
dispatchEvent(event);
|
||||
}
|
||||
);
|
||||
|
||||
console.log( this.uploadData);
|
||||
// console.log( this.uploadData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ export class JobactivePage implements OnInit {
|
||||
action:number,
|
||||
member_id: number,
|
||||
uid: string,
|
||||
family_uid: string,
|
||||
contract: string,
|
||||
sessionid: string,
|
||||
msg_type:'FILE',
|
||||
file_name: string,
|
||||
@@ -152,27 +152,30 @@ export class JobactivePage implements OnInit {
|
||||
//debugger;
|
||||
//image.base64String
|
||||
this.uploadData={
|
||||
action:11305,
|
||||
action:14010,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
family_uid: 'FAKE',
|
||||
contract: this.jobData.contract,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
msg_type:'FILE',
|
||||
file_name: `family-banner.${image.format}`,
|
||||
file_name: `${this.jobData.contract}-job.${image.format}`,
|
||||
file_size: file_size ,
|
||||
file_type: `image/${image.format}`,
|
||||
file_data: image.base64String
|
||||
};
|
||||
//console.log(image);
|
||||
// console.log(this.uploadData);
|
||||
loading.present();
|
||||
// this.wrenchService.uploadFile(this.uploadData).subscribe(
|
||||
// uploadResult => {
|
||||
// this.uploadResult = uploadResult;
|
||||
// console.log("this.wrenchService.uploadFile RETURN DATA->", this.uploadResult);
|
||||
// }
|
||||
// );
|
||||
this.wrenchService.uploadFile(this.uploadData).subscribe(
|
||||
uploadResult => {
|
||||
this.uploadResult = uploadResult;
|
||||
console.log("this.wrenchService.uploadFile RETURN DATA->", this.uploadResult);
|
||||
const event = new Event("app-taskactivities-refresh");
|
||||
// Dispatch the event.
|
||||
dispatchEvent(event);
|
||||
}
|
||||
);
|
||||
|
||||
console.log( this.uploadData);
|
||||
// console.log( this.uploadData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user