This commit is contained in:
Peter Maquiran
2024-07-26 18:19:08 +01:00
parent 12edcc7481
commit 739279d3e3
4 changed files with 17 additions and 10 deletions
@@ -28,6 +28,7 @@ import { PublicationAttachmentEntity } from 'src/app/shared/publication/upload/u
import { PublicationFromMvService } from "src/app/shared/publication/upload/publication-from-mv.service"
import { CropImagePage } from 'src/app/modals/crop-image/crop-image.page';
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
const config = {
quality: 0.5,
@@ -749,7 +750,9 @@ export class NewPublicationPage implements OnInit {
}
loadVideoAndroid(resultUrl, element) {
@XTracerAsync({name:'new-publication-mobile/gallery', bugPrint: true, autoFinish: true})
loadVideoAndroid(resultUrl, element, tracing?: TracingType) {
Filesystem.readFile({ path: resultUrl })
.then(async (content) => {
@@ -758,6 +761,7 @@ export class NewPublicationPage implements OnInit {
if (this.removeTextBeforeSlash(element.mimeType, '/') == "mp4") {
tracing.log("capture file from gallery", { base64: content.data })
const newAttachment = new PublicationAttachmentEntity(
{
base64: content.data,
@@ -770,9 +774,14 @@ export class NewPublicationPage implements OnInit {
newAttachment.needUpload()
this.PublicationFromMvService.form.Files.push(newAttachment)
tracing.setAttribute('outcome','success')
tracing.finish()
} else {
this.capturedImage = 'data:image/jpeg;base64,' + content.data;
this.showCroppModal()
tracing.hasError('failed to capture file from gallery')
tracing.finish()
/* const newAttachment = new PublicationAttachmentEntity(
{
base64: 'data:image/jpeg;base64,' + content.data,
@@ -72,11 +72,9 @@ export class ViewPublicationsPage implements OnInit {
public ThemeService: ThemeService,
private toastService: ToastService,
public p: PermissionService,
private httpErroHandle: HttpErrorHandle,
private storage: Storage,
public publicationFolderService: PublicationFolderService,
public checkFileType: checkFileTypeService,
private publicationVideoManagerService: PublicationVideoManagerService,
public stopvideoService: StopvideoService,
public platform: Platform,
public activeTabService: ActiveTabService,
@@ -31,7 +31,7 @@ function convertAttributesToString(obj) {
result[key] = JSON.stringify(obj[key], null, 2);
} else {
// Convert primitive values to string
result[key] = String(obj[key]);
result[key] = obj[key];
}
}
}
+6 -6
View File
@@ -1,11 +1,11 @@
export let versionData = {
"shortSHA": "aef52722e",
"SHA": "aef52722e878d364f129191a3188d91c2e93b924",
"shortSHA": "12edcc748",
"SHA": "12edcc7481b60fa092db21006d95a429fb8ed1c3",
"branch": "feature/agenda-api-peter",
"lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Fri Jul 26 17:00:06 2024 +0100'",
"lastCommitMessage": "add token login and publication hub connection",
"lastCommitNumber": "5887",
"changeStatus": "On branch feature/agenda-api-peter\nYour branch is up to date with 'origin/feature/agenda-api-peter'.\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: version/git-version.ts",
"lastCommitTime": "'Fri Jul 26 17:02:35 2024 +0100'",
"lastCommitMessage": "update verion",
"lastCommitNumber": "5888",
"changeStatus": "On branch feature/agenda-api-peter\nYour branch is up to date with 'origin/feature/agenda-api-peter'.\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/publications/new-publication/new-publication.page.ts\n\tmodified: src/app/pages/publications/view-publications/view-publications.page.ts\n\tmodified: src/app/services/monitoring/opentelemetry/tracer.ts",
"changeAuthor": "peter.maquiran"
}