mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge with developer branch
This commit is contained in:
@@ -53,10 +53,11 @@ export class FileService {
|
||||
private platform: Platform,
|
||||
private loadingCtrl: LoadingController,
|
||||
private http: HttpClient,
|
||||
) { }
|
||||
) {
|
||||
this.headers = new HttpHeaders();
|
||||
}
|
||||
|
||||
uploadFile(formData:any){
|
||||
alert('OIEE')
|
||||
|
||||
//const geturl = environment.apiURL + 'Tasks/DelegateTask';
|
||||
const geturl = environment.apiURL + 'ObjectServer/UploadFiles';
|
||||
@@ -74,6 +75,9 @@ export class FileService {
|
||||
|
||||
params = params.set("path", guid);
|
||||
|
||||
this.headers = this.headers.set('responseType', 'blob');
|
||||
this.headers = this.headers.set('Content-Type', 'application/octet-stream');
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
@@ -339,24 +343,6 @@ export class FileService {
|
||||
//loader.remove();
|
||||
});
|
||||
*/ }
|
||||
async shareLocalFile(){
|
||||
this.http.get('./assets/any.svg', {responseType: 'blob'}).subscribe(res=>{
|
||||
const reader = new FileReader()
|
||||
reader.onloadend=()=>{
|
||||
const result = reader.result as string
|
||||
const base64Data = result.split(',')[1]
|
||||
|
||||
/* FileSharer.share({
|
||||
filename:'any.pdf',
|
||||
base64Data,
|
||||
contentType: "application/pdf",
|
||||
}) */
|
||||
reader.readAsDataURL(res)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
addPictureToChat(roomId) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user