NO ME DESCARGA LOS DOCUMENTOS SUBIDOS

Buenos días.

Una vez cargado un documento y guardado, cuando intentamos acceder a él para descargarlo, se abre una nueva pestaña en blanco; pero no se descarga.
Nuestra versión es la 7.9.4

Muchas gracias por anticipado.

Tengo el mismo problema, haber si alguien sabe algo.

Encontré esto, voy a probarlo…
ello everyone,

Based on the link provided by lotz98 I have created a script that does the job. (At least for me) Please note that based on some browsers settings the files may still be downloaded. Also, if there are better ways of doing this please let me know.

You will need to create a Custom Entry Point which is fairly simple. First you create the entry point file in ./custom/YourCustomEntryPoint.php

<?php if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $fileRevision = $_GET['file']; $filename = $_GET['fileName']; $documentExt = substr(strtolower($filename), -4); switch ($documentExt) { case ".pdf": $ContentType = "application/pdf"; break; case "jpeg": $ContentType = "image/jpeg"; break; case ".jpg": $ContentType = "image/jpeg"; break; case ".png": $ContentType = "image/png"; break; case ".gif": $ContentType = "image/gif"; break; } if ($ContentType == "application/pdf" || $ContentType == "image/jpeg" || $ContentType == "image/png" || $ContentType == "image/gif") { $file = "upload://". $fileRevision; header('Content-type: '. $ContentType ); header('Content-Disposition: inline; filename="' . $filename . '"'); header('Content-Transfer-Encoding: binary'); header('Content-Length: ' . filesize($file)); header('Accept-Ranges: bytes'); @readfile($file); }else{ echo "Preview is not supported for this type of file."; } ?>

Then create the extension in the application extensions. ./custom/Extension/application/Ext/EntryPointRegistry/YourCustomEntryPoint.php

<?php $entry_point_registry['YourCustomEntryPoint'] = array( 'file' => 'custom/YourCustomEntryPoint.php', 'auth' => true ); Go to studio=>documents=>fields an make a custom field with the below properties (as described on the link provided): - Datatype: Iframe - Field label: Preview - Generate URL: Yes - Standard value: http://{suite url}/index.php?entryPoint=YourCustomEntryPoint&file={document_revision_id}&fileName={filename} - Maximun size: 225 - Iframe height: 500 - Save - Go to studio=>documents=>layout=>detailview and make a panel called something like “Preview” - Place the “preview” block on the new panel and make it fit the whole line. Then, navigate to Admin > Repair > Quick Repair and Rebuild. If the browser is not set to download certain file extensions, you should be able to view pdf, jpeg, png and gif.

Lo has probado ya?

Seria mejor lograr que funcione la función normal, en lugar de hacer una nueva.

Como son los URL de vuestros documentos, los que abren la nueva pestaña?

Eso se pasa en cualquier browser, o solo en uno? Cual?

Si lo probé y no jaló…

Quizá solo soy yo pero son algunos bugs por así llamarlos, cuando el das clic a un documento te da una ruta pero no abre ni descarga nada, adjunto pantallas

Esta es la pantalla cuando entras a un documento:

Esta es la pantalla cuando le das clic al documento PDF

Como verán no carga nada, he tenido otros bugs pero no quiero desviar el tema…

Hay algun error en suitecrm.log o en php_errors.log cuando se crea el documento, o cuando se intenta abrirlo?