Merge branch 'feature/viewer-attachment' of bitbucket.org:equilibriumito/gabinete-digital-fo into feature/viewer-attachment

This commit is contained in:
Peter Maquiran
2024-03-03 10:28:19 +01:00
42 changed files with 743 additions and 302 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ export class checkFileTypeService {
const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp','tiff','tif',
'image/jpg', 'image/jpeg', 'image/png', 'image/gif', 'image/bmp','image/tiff','image/tif', 'image/*']; // Add more if needed
const videoExtensions = ['mp4', 'webm', 'mpg', 'mpeg', 'ogg',
'video/mp4', 'video/webm', 'video/mpg', 'video/mpeg', 'video/ogg','video/quicktime', 'video/*']; // Add more if needed
'video/mp4', 'video/webm', 'video/mpg', 'video/mpeg', 'video/ogg','video/quicktime','MOV','mov', 'video/*']; // Add more if needed
// Check if it's an image
if (imageExtensions.includes(lowerCaseType)) {
-1
View File
@@ -51,7 +51,6 @@ export class ProcessesService {
this.headers2 = new HttpHeaders();;
this.headers2 = this.headers2.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
}
uploadFile(formData: any) {
+4 -3
View File
@@ -10,11 +10,12 @@ export class VideoconvertService {
private ffmpeg: FFMpeg
) { }
async convertVideo(inputPath, outputPath, formart) {
const ffmpegCommand = `-i "${inputPath}" -c:v copy -c:a aac -strict experimental "${outputPath}output.${formart}"`;
async convertVideo(inputPath, outputPath,filename, formart) {
const ffmpegCommand = `-i "${inputPath}" -c:v copy -c:a aac -strict experimental "${outputPath}${filename}.${formart}"`;
const result = await this.ffmpeg.exec(ffmpegCommand)
console.log('Convert returns ', `${outputPath}output.${formart}`);
console.log('Convert returns ', `${outputPath}${filename}.${formart}`);
}
}