add file
This commit is contained in:
@@ -101,11 +101,11 @@
|
|||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col style="text-align: left;">
|
<ion-col style="text-align: left;">
|
||||||
<ion-button fill="outline" size="small" color="secondary" (click)="pickFiles(100)">
|
<ion-button fill="outline" size="small" color="secondary" (click)="pickFiles(100)">
|
||||||
<ion-icon slot="icon-only" name="camera-reverse-outline"></ion-icon>
|
<ion-icon name="document-attach-outline"></ion-icon> Send File
|
||||||
</ion-button>
|
|
||||||
<ion-button fill="outline" size="small" style="margin-left: 10px;" (click)="pickFiles(0)">
|
|
||||||
<ion-icon slot="icon-only" name="folder-outline"></ion-icon>
|
|
||||||
</ion-button>
|
</ion-button>
|
||||||
|
<!-- <ion-button fill="outline" size="small" style="margin-left: 10px;" (click)="pickFiles(0)">-->
|
||||||
|
<!-- <ion-icon slot="icon-only" name="folder-outline"></ion-icon>-->
|
||||||
|
<!-- </ion-button>-->
|
||||||
</ion-col>
|
</ion-col>
|
||||||
<ion-col>
|
<ion-col>
|
||||||
<ion-button style="margin-left: 20px;"
|
<ion-button style="margin-left: 20px;"
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ export class MediaConnectService {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
public sessionDataProviderService :SessionDataProviderService) {
|
public sessionDataProviderService :SessionDataProviderService) {
|
||||||
// this is test
|
// this is test
|
||||||
this.url = 'https://dev-media.wrenchboard.com';
|
// this.url = 'https://dev-media.wrenchboard.com';
|
||||||
|
this.url = environment.baseMediaUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
sendPostData(reqPath:string, reqData, file:File): Observable<any> {
|
sendPostData(reqPath:string, reqData, file:File): Observable<any> {
|
||||||
@@ -38,25 +39,10 @@ export class MediaConnectService {
|
|||||||
|
|
||||||
headers.append('Content-Type','multipart/form-data');
|
headers.append('Content-Type','multipart/form-data');
|
||||||
|
|
||||||
//console.log(formData);
|
|
||||||
/*
|
|
||||||
const apiReturn = this.http.post(
|
|
||||||
`${environment.baseMediaUrl}/${reqPath}`,formData, { headers: headers}
|
|
||||||
);
|
|
||||||
*/
|
|
||||||
const apiReturn = this.http.post(
|
const apiReturn = this.http.post(
|
||||||
`${environment.baseMediaUrl}/${reqPath}`,formData,
|
`${environment.baseMediaUrl}/${reqPath}`,formData,
|
||||||
);
|
);
|
||||||
// const apiReturn = this.http.post(
|
|
||||||
// `${environment.baseMediaUrl}/${reqPath}`,reqData
|
|
||||||
// );
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
axios.post('https://dev-media.wrenchboard.com/upload/contract',reqData )
|
|
||||||
.then( res => {})
|
|
||||||
.catch(er => console.log(er))
|
|
||||||
*/
|
|
||||||
return apiReturn;
|
return apiReturn;
|
||||||
}
|
}
|
||||||
uploadtaskFile(formData, file:File){
|
uploadtaskFile(formData, file:File){
|
||||||
|
|||||||
Reference in New Issue
Block a user