Exibir anexo no app Fluig

Preciso exibir um anexo no modal em uma Widget.
Pela web funciona, mas quando tento ver o anexo pelo app, ele não é exibido.
Alguém consegue ajudar?

Parte do código:

 var base64 = btoa(doc.output());
  var pdfUrl = "data:application/pdf;base64," + base64;

  var html = "<div id='divModalPDF'>"
  html += "     <iframe src='" + pdfUrl + "'  width='100%' height='100%' />"
  html += "   </div>"

  if (html) {
    this.myModal = FLUIGC.modal({
      title: 'Document',
      content: html,
      id: 'modalAFFSMobile',
      size: 'full',
      actions: [{
        'label': 'Close',
        'autoClose': true
      }]
    }, function (err, data) {
      if (err) {
        console.error(err)
      } else {

        $('#modalAFFSMobile').keyup(event => {
          if (event.key == 'Escape') {
            this.myModal.remove()
          }
        })
      }
    })
  }

1 curtida

Boa Noite. Não sei se desta forma vai funcionar porque o aplicativo esta rodando em android ou IOS. Voce ja tentou abrir um arquivo PDF que esteja publicado no GED ?

var url = WCMAPI.getServerURL()+“/portal/p/1/ecmnavigation?app_ecm_navigation_doc=numIDDOCTO”;
window.open(url, ‘_blank’);

Consegui como solução:

function initDocumentView(docId) {
  window.location.href = "fluig://" + WCMAPI.getServerURL() + WCMAPI.getProtectedContextPath() + "/" + WCMAPI.getTenantCode() + "/ecmnavigation?app_ecm_navigation_doc=" + docId
}