
{"id":4799,"date":"2025-07-23T22:56:16","date_gmt":"2025-07-23T20:56:16","guid":{"rendered":"https:\/\/syf.es\/?p=4799"},"modified":"2026-06-07T22:16:21","modified_gmt":"2026-06-07T20:16:21","slug":"wetransfer","status":"publish","type":"post","link":"https:\/\/syf.es\/?p=4799","title":{"rendered":"telomando"},"content":{"rendered":"    <form id=\"telomando-form\" enctype=\"multipart\/form-data\" style=\"max-width: 600px; margin: auto; padding: 25px; border: 1px solid #ddd; border-radius: 10px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.1);\">\n        <div style=\"margin-bottom: 20px;\">\n            <label for=\"sender\" style=\"display: block; margin-bottom: 8px; font-weight: 600; color: #333;\">Tu correo electr\u00f3nico:<\/label>\n            <input type=\"email\" id=\"sender\" name=\"sender\" placeholder=\"tu@correo.com\" required style=\"width: 100%; padding: 12px; border: 2px solid #ddd; border-radius: 6px; font-size: 16px; box-sizing: border-box;\">\n        <\/div>\n        <div style=\"margin-bottom: 20px;\">\n            <label for=\"receiver\" style=\"display: block; margin-bottom: 8px; font-weight: 600; color: #333;\">Correo del destinatario:<\/label>\n            <input type=\"email\" id=\"receiver\" name=\"receiver\" placeholder=\"destinatario@correo.com\" required style=\"width: 100%; padding: 12px; border: 2px solid #ddd; border-radius: 6px; font-size: 16px; box-sizing: border-box;\">\n        <\/div>\n        <div style=\"margin-bottom: 20px;\">\n            <label for=\"password\" style=\"display: block; margin-bottom: 8px; font-weight: 600; color: #333;\">Contrase\u00f1a para descargar (opcional):<\/label>\n            <input type=\"password\" id=\"password\" name=\"password\" value=\"\" placeholder=\"Dejar vac\u00edo si no quieres contrase\u00f1a\" autocomplete=\"new-password\" style=\"width: 100%; padding: 12px; border: 2px solid #ddd; border-radius: 6px; font-size: 16px; box-sizing: border-box;\">\n            <small style=\"color: #666; font-size: 13px; margin-top: 5px; display: block;\">\ud83d\udca1 Si no pones contrase\u00f1a, cualquiera con el enlace podr\u00e1 descargar el archivo<\/small>\n        <\/div>\n        <div style=\"margin-bottom: 20px;\">\n            <label for=\"file\" style=\"display: block; margin-bottom: 8px; font-weight: 600; color: #333;\">Selecciona el archivo (m\u00e1x. 2 GB):<\/label>\n            <input type=\"file\" id=\"file\" name=\"file\" required style=\"width: 100%; padding: 12px; border: 2px solid #ddd; border-radius: 6px; font-size: 16px; box-sizing: border-box;\">\n            <div style=\"background: #f8f9fa; padding: 12px; border-radius: 6px; margin-top: 10px; font-size: 14px; color: #495057;\">\n                <strong>\ud83d\udcca L\u00edmite actual del servidor:<\/strong> <span style=\"color: #007bff; font-weight: 600;\">2 GB<\/span>\n            <\/div>\n            <!-- Informaci\u00f3n del archivo seleccionado - Mejorada para m\u00f3vil -->\n            <div id=\"file-info\" style=\"display: none; background: #e8f5e8; padding: 15px; border-radius: 6px; margin-top: 10px; border: 1px solid #4CAF50;\">\n                <div style=\"display: flex; align-items: center; margin-bottom: 8px;\">\n                    <span style=\"color: #4CAF50; font-size: 18px; margin-right: 8px;\">\u2705<\/span>\n                    <strong style=\"color: #2e7d32; font-size: 16px;\">Archivo seleccionado:<\/strong>\n                <\/div>\n                <div id=\"file-details\" style=\"background: white; padding: 12px; border-radius: 4px; border-left: 4px solid #4CAF50;\">\n                    <div id=\"file-name\" style=\"color: #1565c0; font-weight: 600; font-size: 15px; word-break: break-all; margin-bottom: 5px;\"><\/div>\n                    <div id=\"file-size\" style=\"color: #666; font-size: 14px;\"><\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n        <input type=\"hidden\" id=\"telomando_nonce\" name=\"telomando_nonce\" value=\"ea21b0a7ba\">\n        <input type=\"hidden\" id=\"max_file_size\" value=\"2147483648\">\n        <button type=\"submit\" id=\"submit-btn\" style=\"width: 100%; padding: 15px; background-color: #4CAF50; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; line-height: 1; transition: background-color 0.3s;\">Enviar<\/button>\n        \n        <div id=\"progress-container\" style=\"display:none; margin-top: 20px;\">\n            <div style=\"background:#f8f9fa; padding: 20px; border-radius: 8px; border: 1px solid #dee2e6;\">\n                <div style=\"display: flex; justify-content: space-between; margin-bottom: 8px;\">\n                    <span id=\"progress-text\" style=\"font-weight: 600; color: #495057;\">Preparando...<\/span>\n                    <span id=\"progress-percent\" style=\"font-weight: 600; color: #007bff;\">0%<\/span>\n                <\/div>\n                <div style=\"background:#e9ecef; width:100%; height:25px; border-radius: 6px; overflow: hidden; margin-bottom: 15px;\">\n                    <div id=\"progress\" style=\"height:100%; width:0; background: linear-gradient(90deg, #4CAF50, #45a049); transition: width 0.3s ease;\"><\/div>\n                <\/div>\n                <div id=\"upload-info\" style=\"font-size: 13px; color: #6c757d;\">\n                    <div style=\"margin-bottom: 5px;\">Velocidad: <span id=\"upload-speed\" style=\"font-weight: 600;\">Calculando...<\/span><\/div>\n                    <div style=\"margin-bottom: 5px;\">Tiempo restante: <span id=\"time-remaining\" style=\"font-weight: 600;\">Calculando...<\/span><\/div>\n                    <div>Subido: <span id=\"uploaded-size\" style=\"font-weight: 600;\">0 MB<\/span> de <span id=\"total-size\" style=\"font-weight: 600;\">0 MB<\/span><\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n        <div id=\"mensaje\" style=\"margin-top:15px; text-align: center;\"><\/div>\n    <\/form>\n    <style>\n        .success-modal { \n            position: fixed; \n            top: 0; \n            left: 0; \n            width: 100%; \n            height: 100%; \n            background: rgba(0,0,0,0.8); \n            display: flex; \n            align-items: center; \n            justify-content: center; \n            z-index: 99999; \n        }\n        .success-modal-content { \n            background: white; \n            padding: 30px 40px; \n            border-radius: 12px; \n            text-align: center; \n            max-width: 500px; \n            width: 90%; \n            box-shadow: 0 10px 30px rgba(0,0,0,0.3);\n        }\n        .success-modal-content h3 { \n            color: #4CAF50; \n            margin-bottom: 20px; \n            font-size: 24px;\n        }\n        .success-modal-content p {\n            margin-bottom: 25px;\n            color: #333;\n            line-height: 1.5;\n        }\n        .success-modal-content button { \n            padding: 12px 30px; \n            background-color: #4CAF50; \n            color: white; \n            border: none; \n            border-radius: 6px; \n            cursor: pointer; \n            font-size: 16px; \n            font-weight: 600;\n            transition: background-color 0.3s;\n        }\n        .success-modal-content button:hover {\n            background-color: #45a049;\n        }\n        .file-selected { \n            background: #e8f5e8 !important; \n            border-color: #4CAF50 !important; \n        }\n        #telomando-form input:focus {\n            outline: none;\n            border-color: #4CAF50;\n            box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);\n        }\n        #submit-btn:hover {\n            background-color: #45a049;\n        }\n        #submit-btn:disabled {\n            background-color: #ccc;\n            cursor: not-allowed;\n        }\n        \n        \/* Estilos responsivos para m\u00f3vil *\/\n        @media (max-width: 768px) {\n            #file-details {\n                padding: 10px !important;\n            }\n            #file-name {\n                font-size: 14px !important;\n                line-height: 1.4 !important;\n            }\n            #file-size {\n                font-size: 13px !important;\n            }\n        }\n    <\/style>\n    <script>\n    jQuery(document).ready(function($){\n        \/\/ Limpiar campo de contrase\u00f1a al cargar la p\u00e1gina\n        $('#password').val('');\n        \n        var maxFileSize = parseInt($('#max_file_size').val());\n        var uploadStartTime = 0;\n        var lastLoaded = 0;\n        var lastTime = 0;\n        \n        \/\/ Funci\u00f3n para formatear bytes\n        function formatBytes(bytes, decimals = 2) {\n            if (bytes === 0) return '0 Bytes';\n            const k = 1024;\n            const dm = decimals < 0 ? 0 : decimals;\n            const sizes = ['Bytes', 'KB', 'MB', 'GB'];\n            const i = Math.floor(Math.log(bytes) \/ Math.log(k));\n            return parseFloat((bytes \/ Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n        }\n\n        \/\/ Funci\u00f3n para calcular velocidad y tiempo restante\n        function updateUploadStats(loaded, total) {\n            var currentTime = Date.now();\n            if (lastTime > 0) {\n                var timeDiff = (currentTime - lastTime) \/ 1000;\n                var bytesDiff = loaded - lastLoaded;\n                var speed = bytesDiff \/ timeDiff;\n                \n                if (speed > 0) {\n                    var remaining = (total - loaded) \/ speed;\n                    $('#upload-speed').text(formatBytes(speed) + '\/s');\n                    \n                    if (remaining < 60) {\n                        $('#time-remaining').text(Math.round(remaining) + ' segundos');\n                    } else if (remaining < 3600) {\n                        $('#time-remaining').text(Math.round(remaining \/ 60) + ' minutos');\n                    } else {\n                        $('#time-remaining').text(Math.round(remaining \/ 3600) + ' horas');\n                    }\n                }\n            }\n            \n            lastLoaded = loaded;\n            lastTime = currentTime;\n            $('#uploaded-size').text(formatBytes(loaded));\n            $('#total-size').text(formatBytes(total));\n        }\n\n        \/\/ Verificar tama\u00f1o de archivo al seleccionar - MEJORADO\n        $('#file').on('change', function() {\n            var file = this.files[0];\n            $('#mensaje').html(''); \/\/ Limpiar mensajes anteriores\n            \n            if (file) {\n                \/\/ Mostrar informaci\u00f3n del archivo\n                $('#file-name').text(file.name);\n                $('#file-size').text('Tama\u00f1o: ' + formatBytes(file.size));\n                $('#file-info').show();\n                \n                if (file.size > maxFileSize) {\n                    var maxFormatted = formatBytes(maxFileSize);\n                    var fileFormatted = formatBytes(file.size);\n                    $('#mensaje').html('<div style=\"color:#dc3545; background:#f8d7da; padding:12px; border-radius:6px; border:1px solid #f5c6cb;\">\u274c El archivo es demasiado grande (' + fileFormatted + '). M\u00e1ximo permitido: ' + maxFormatted + '<\/div>');\n                    $(this).val('');\n                    $(this).removeClass('file-selected');\n                    $('#file-info').hide();\n                } else {\n                    $(this).addClass('file-selected');\n                    \n                    \/\/ Advertencia para archivos muy grandes\n                    if (file.size > 1024 * 1024 * 1024) { \/\/ > 1GB\n                        $('#mensaje').html('<div style=\"color:#856404; background:#fff3cd; padding:12px; border-radius:6px; border:1px solid #ffeaa7; margin-top:10px;\">\u26a0\ufe0f Archivo grande detectado. La subida puede tardar mucho tiempo.<\/div>');\n                    }\n                }\n            } else {\n                $('#file-info').hide();\n                $(this).removeClass('file-selected');\n            }\n        });\n\n        $('#telomando-form').on('submit', function(e){\n            e.preventDefault();\n\n            function isValidEmail(email) {\n                return \/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$\/.test(email);\n            }\n\n            var sender = $('input[name=\"sender\"]').val();\n            var receiver = $('input[name=\"receiver\"]').val();\n            var file = $('#file')[0].files[0];\n\n            if (!isValidEmail(sender) || !isValidEmail(receiver)) {\n                $('#mensaje').html('<div style=\"color:#dc3545; background:#f8d7da; padding:12px; border-radius:6px; border:1px solid #f5c6cb;\">\u274c Por favor, ingresa correos v\u00e1lidos.<\/div>');\n                return;\n            }\n\n            if (!file) {\n                $('#mensaje').html('<div style=\"color:#dc3545; background:#f8d7da; padding:12px; border-radius:6px; border:1px solid #f5c6cb;\">\u274c Por favor, selecciona un archivo.<\/div>');\n                return;\n            }\n\n            if (file.size > maxFileSize) {\n                var maxFormatted = formatBytes(maxFileSize);\n                $('#mensaje').html('<div style=\"color:#dc3545; background:#f8d7da; padding:12px; border-radius:6px; border:1px solid #f5c6cb;\">\u274c El archivo es demasiado grande. M\u00e1ximo: ' + maxFormatted + '<\/div>');\n                return;\n            }\n\n            var formData = new FormData(this);\n            formData.append('action', 'telomando_upload');\n            formData.append('telomando_nonce', $('#telomando_nonce').val());\n\n            $('#submit-btn').prop('disabled', true).text('Subiendo archivo...');\n            $('#progress-container').show();\n            $('#mensaje').html('');\n            uploadStartTime = Date.now();\n            lastLoaded = 0;\n            lastTime = 0;\n\n            $.ajax({\n                xhr: function() {\n                    var xhr = new window.XMLHttpRequest();\n                    xhr.upload.addEventListener(\"progress\", function(evt) {\n                        if (evt.lengthComputable) {\n                            var percent = Math.round((evt.loaded \/ evt.total) * 100);\n                            $('#progress').width(percent + '%');\n                            $('#progress-percent').text(percent + '%');\n                            \n                            if (percent < 100) {\n                                $('#progress-text').text('Subiendo archivo...');\n                                updateUploadStats(evt.loaded, evt.total);\n                            } else {\n                                $('#progress-text').text('Procesando archivo en el servidor...');\n                                $('#upload-speed').text('Completado');\n                                $('#time-remaining').text('Procesando...');\n                            }\n                        }\n                    }, false);\n                    return xhr;\n                },\n                url: 'https:\/\/syf.es\/wp-admin\/admin-ajax.php',\n                type: 'POST',\n                data: formData,\n                contentType: false,\n                processData: false,\n                dataType: 'json',\n                timeout: 0,\n                success: function(response){\n                    if (response.success) {\n                        $('#progress-text').text('\u00a1Subida completada!');\n                        showSuccessModal(response.data);\n                    } else {\n                        $('#mensaje').html('<div style=\"color:#dc3545; background:#f8d7da; padding:12px; border-radius:6px; border:1px solid #f5c6cb;\">\u274c ' + response.data + '<\/div>');\n                        resetForm();\n                    }\n                },\n                error: function(xhr, status, error){\n                    var errorMsg = 'Error en el env\u00edo';\n                    if (xhr.status === 413) {\n                        errorMsg = 'El archivo es demasiado grande para el servidor.';\n                    } else if (xhr.status === 0) {\n                        errorMsg = 'Error de conexi\u00f3n. Verifica tu conexi\u00f3n a internet.';\n                    } else if (xhr.status === 500) {\n                        errorMsg = 'Error interno del servidor. El archivo puede ser demasiado grande.';\n                    } else if (xhr.status === 502 || xhr.status === 504) {\n                        errorMsg = 'Timeout del servidor. El archivo puede ser demasiado grande o la conexi\u00f3n muy lenta.';\n                    }\n                    $('#mensaje').html('<div style=\"color:#dc3545; background:#f8d7da; padding:12px; border-radius:6px; border:1px solid #f5c6cb;\">\u274c ' + errorMsg + '<\/div>');\n                    resetForm();\n                }\n            });\n        });\n\n        function resetForm() {\n            $('#submit-btn').prop('disabled', false).text('Enviar');\n            $('#progress-container').hide();\n            $('#progress').width('0%');\n            $('#progress-percent').text('0%');\n            $('#progress-text').text('Preparando...');\n        }\n\n        function showSuccessModal(message) {\n            var modal = $('<div class=\"success-modal\"><div class=\"success-modal-content\"><h3>\u2705 Enviado con \u00c9xito<\/h3><p>' + message + '<\/p><button id=\"close-modal-btn\">Aceptar<\/button><\/div><\/div>');\n            $('body').append(modal);\n            $('#close-modal-btn').on('click', function() {\n                $('.success-modal').remove();\n                \/\/ Reset completo del formulario incluyendo contrase\u00f1a\n                $('#telomando-form')[0].reset();\n                $('#password').val(''); \/\/ Asegurar que la contrase\u00f1a est\u00e9 vac\u00eda\n                $('#file').removeClass('file-selected');\n                $('#file-info').hide(); \/\/ Ocultar info del archivo\n                resetForm();\n                $('#mensaje').html('');\n            });\n        }\n    });\n    <\/script>\n    \n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; &nbsp; &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":4790,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[86,36],"tags":[],"class_list":["post-4799","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-cloud","category-tecnologia"],"_links":{"self":[{"href":"https:\/\/syf.es\/index.php?rest_route=\/wp\/v2\/posts\/4799","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/syf.es\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/syf.es\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/syf.es\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/syf.es\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4799"}],"version-history":[{"count":5,"href":"https:\/\/syf.es\/index.php?rest_route=\/wp\/v2\/posts\/4799\/revisions"}],"predecessor-version":[{"id":4960,"href":"https:\/\/syf.es\/index.php?rest_route=\/wp\/v2\/posts\/4799\/revisions\/4960"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/syf.es\/index.php?rest_route=\/wp\/v2\/media\/4790"}],"wp:attachment":[{"href":"https:\/\/syf.es\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/syf.es\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4799"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/syf.es\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}