mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -10,13 +10,13 @@ import { SearchList } from 'src/app/models/search-document';
|
||||
import { ProcessesService } from '../processes.service';
|
||||
import { ToastService } from '../toast.service';
|
||||
import { Camera, CameraResultType, CameraSource, Photo} from '@capacitor/camera';
|
||||
|
||||
import { Filesystem, Directory } from '@capacitor/filesystem';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
|
||||
const IMAGE_DIR = 'stored-images';
|
||||
|
||||
|
||||
interface LocalFile {
|
||||
name: string;
|
||||
path: string;
|
||||
@@ -261,13 +261,6 @@ export class FileService {
|
||||
if (image) {
|
||||
await this.saveImage(image,roomId)
|
||||
}
|
||||
/* const response = await fetch(capturedImage.webPath!);
|
||||
const blob = await response.blob();
|
||||
|
||||
this.photos.unshift({
|
||||
filepath: "soon...",
|
||||
webviewPath: capturedImage.webPath
|
||||
}); */
|
||||
|
||||
//this.capturedImage = this.capturedImage;
|
||||
|
||||
@@ -287,6 +280,8 @@ export class FileService {
|
||||
if (capturedImage) {
|
||||
await this.saveImage(capturedImage,roomId)
|
||||
}
|
||||
|
||||
|
||||
/* const response = await fetch(capturedImage.webPath!);
|
||||
const blob = await response.blob();
|
||||
|
||||
@@ -320,6 +315,24 @@ 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