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

277
Vistas
Copy mail from Outlook and paste msg-file to file input


Copying different files into the input such as xlxs, png, msg, etc. works perfectly. What I wish to accomplish is being able to copy mails directly from Outlook into the input (as msg-files).

The problem:

If I copy a mail from Outlook with the current solution I get vague information such as the subject, sent date, receiver etc - Just as if you would paste the clipboard into notepad.

The Goal:

If you copy a mail from Outlook into a word document for example, it creates a clickable msg-file. This is the file I'd like to paste into my input.

Right now, I've to copy the mail from Outlook, paste it into word, copy it again, to finally being able to paste the msg-file into the input

HTML:

<div id="documentUploadDiv">
  <div id="filedataholder" filebase64data="" hasfile="false"></div>
  <div id="filereaderdialog_filegroup">
    <input type="file" id="filedatareader_filegroup">
  </div>
</div>

Script:

window.addEventListener('paste', e => {
try{          
    $('#filedatareader_filegroup').get(0).files = e.clipboardData.files;
    $('#filedatareader_filegroup').trigger("change");

    var reader = new FileReader();
    reader.readAsDataURL(e.clipboardData.files[0]);

    $("#filedataholder").attr("filebase64data", reader.result) 
  
    }catch(e){
        console.error(e)
    }
});
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

That is because Outlook copies its message in multiple clipboard formats, but FileContents/Filename are not available since there is no real file on the file system.

See Upload fails when user drags and drops attachment from email client for a similar issue.

enter image description here

about 4 years ago · Juan Pablo Isaza Denunciar
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