But if you donât like this, you can create a fullscreen âpreviewâ using the journey.files.viewFile(attachment); syntax from your App JS. Here is a slightly different use case using the same syntax.
That said, if you want to get the URL of the attachment you can do that from CloudCode or via the Backend API
So you can update your original CC task to also save the URL to the object directly after creating/saving the Attachment, you just need to reload it first. Like so.
var report = await pdf.generatePdf({html: generated_html});
var pdfBase64 = await report.toBase64();
inspection.report_eng = await Attachment.create({filename: âreport_eng.pdfâ, base64:pdfBase64});
await inspection.save()
// reload the object to ensure you get the URLs
await inspection.reload();
if (inspection.report_eng.present()) {
inspection.report_end_url = inspection.report_eng.url();
await inspection.save();
}
Please see here for the original post and answer on getting Attachment URLs into the runtime