Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

176
Vistas
Not able to view or download file on iPhone + SAPUI5

This code works great on tablets and desktop, but when I try on iPhone it is not downloading any file. Please help

if (aData.ExternalUrl === "") {
  this.oModel.read("/GetAttachmentBase64Set('" + aData.DocumentId + "')", {
    success: function (oData, oResponse) {
      oList.setBusy(false);
      var dataURI = oData.EvAttachmentData;

      if (Device.system.tablet ||Device.system.phone) {
        window.open(dataURI, "_blank");
        return;
      }
      dataURI = dataURI.substring(dataURI.indexOf(",") + 1);

      var raw = window.atob(dataURI);
      var rawLength = raw.length;
      var array = new Uint8Array(new ArrayBuffer(rawLength));

      for (var i = 0; i < rawLength; i++) {
        array[i] = raw.charCodeAt(i);
      }

      var saveByteArray = (function () {
        var a = document.createElement("a");
        document.body.appendChild(a);
        a.style = "display: none";
        return function (data, name) {
          var blob = new Blob(data, {
              type: "octet/stream"
            }),
            url = window.URL.createObjectURL(blob);
          a.href = url;
          a.download = name;
          a.click();
          window.URL.revokeObjectURL(url);
        };
      }());

      saveByteArray([array], aData.Filename);

      oList.removeSelections();
    },

This code works great on tablets and desktop, but when I try on iPhone it is not downloading any file. Please help

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda