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

433
Vistas
I can't seen to access the added object property in app script, this property is visible in js though. e.fn is undefined in code.gs

I can't seen to access the added object property in app script, this property is visible in js though. e.fn is undefined in code.gs

HTML

<input type="button" value="Upload" onclick="jsupload(this.parentNode)"/>

JS

function jsupload(ee) {
 if (confirm("Upload picture of " + '[' + fullinfo[1] + '] ' + fullinfo[2] + '?!?') == true) {
   // ee['fn'] = "hey"
   Object.defineProperty(ee, 'fn', {
     value: 'hey'
   })
   google.script.run.withSuccessHandler(showResult).upload(ee)
 }
}

code.gs

function upload(e) {
  var destination_id = 'XXXXXXXXXXXXXXXX'
  var img = e.imageFile
  var contentType = 'image/png'
  var destination = DriveApp.getFolderById(destination_id)
  var img = img.getAs(contentType)

  var newFile = destination.createFile(img).setName(e.fn) // e.fn undefine

  var newFileLink = "http://drive.google.com/uc?export=view&id=" + newFile.getId()

  return newFileLink
}
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