I need to integrate two uploads in the same editor ¿It's possible?

I need to integrate two uploads in the same editor ¿It's possible?

solucionessoluciones Posts: 12Questions: 5Answers: 0
edited October 2018 in Editor

Hi,

I need to integrate two uploads in the same editor. One to upload images and another to upload documents.
The client wants it in different uploads

¿It's possible? ¿How to implement? I copy my code but doesn't work

 {
                "label": "Imagen:",
                "name": "trabajos.file_id",
                type: "upload",
                display: function ( file_id ) {
                    return '<img src="/image.php?img='+editor.file( 'files', file_id ).web_path+'" />';
                },
                clearText: "Clear",
                noImageText: 'No image'
            },
            {
                "label": "Pdf:",
                "name": "trabajos.pdf_id",
                type: "upload",
                display: function ( pdf_id ) {
                    return table.file( 'files', pdf_id ).fileName;
                },
                clearText: "Clear",
                noImageText: 'No Pdf'
            },

Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    That looks okay to me. What about it doesn't work? What error(s) are you getting?

    Allan

This discussion has been closed.