Vajexa
18 September 2020 09:54
#1
hello , i need help about file upload system on crm . i can’t upload 1mb size documents i have this problems …
when i uploading empty text documents its uploading good and i can see it but if i will enter some text in document and trying to upload i have this result … also i changed file upload size but nothing … what i can to do ? help pls i have big problem about !!
crm version : 7.11.13
Sugar 6.5.25 (Build 344)
Hi @Vajexa
Welcome to community!
You want to see preview of the file but the file isn’t image type.
About size. Your web-server (nginx/apache…) control this parameter. Do you restart web-server after change?
can you check your CRM upload folder with the Same ID that you see in the Download URL?
Make sure there is a file in /upload folder with the same ID.
pgr
18 September 2020 10:26
#4
Does the same thing happen with other file extension? PDF, JPG, etc.?
Hi, do these 3 things:
1: Check “Upload” directory permissions
2: and also the permission settings into the crm config.php file.
3: And also restart your apache server after increasing the upload_max_file_size
Thanks
Vajexa
20 September 2020 17:31
#6
i already checked upload file id when i uploading new file with 1 kb file uploading correct…
Vajexa
20 September 2020 17:31
#7
yes i already tried every type of files , but same problem
Hi,
For point 2. Find this index in Config.php file and set it properly
‘default_permissions’ =>
array (
‘dir_mode’ => 1528,
‘file_mode’ => 493,
‘user’ => ‘’,
‘group’ => ‘’,
),
For permissions::
Thank you so much for your reply and explanation.
Kind regards
Hi Will,
obviously the problem is not with SuiteCRM and the SalesAgility team who are all great!!!
I am on a shared hosting service running
. Php 5.3.3
. Linux 2.6.32-531.11.2.lve1.2.55.el6.x86_64 (provided by php_uname()
As you suggested a few weeks ago I have used the following setting in config.php:
(I have also tried with ‘dir_mode’ => 1533, // 2775 and ‘file_mode’ => 493, // 755
)
‘default_permissions’ =>
array (
‘dir_mode’ => 1517,
‘file_mode’ => 420,
‘user’ => ‘’,
‘gr…
For Config File permissions:
Vajexa
21 September 2020 09:45
#10
its look like this what u wrote but no result
pgr
21 September 2020 09:52
#11
Change this line
if (isset($image_field)) {
header("Content-Type: image/png");
header("Content-Disposition: attachment; filename=\"No-Image.png\"");
header("X-Content-Type-Options: nosniff");
header("Content-Length: " . filesize('include/SugarFields/Fields/Image/no_image.png'));
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 2592000));
set_time_limit(0);
readfile('include/SugarFields/Fields/Image/no_image.png');
die();
} else {
die($app_strings['ERR_INVALID_FILE_REFERENCE']);
}
} else {
$doQuery = true;
if ($file_type == 'documents' && !isset($image_field)) {
// cn: bug 9674 document_revisions table has no 'name' column.
$query = "SELECT filename name FROM document_revisions INNER JOIN documents ON documents.id = document_revisions.document_id ";
$query .= "WHERE document_revisions.id = '" . $db->quote($_REQUEST['id']) . "' ";
} elseif ($file_type == 'kbdocuments') {
$query = "SELECT document_revisions.filename name FROM document_revisions INNER JOIN kbdocument_revisions ON document_revisions.id = kbdocument_revisions.document_revision_id INNER JOIN kbdocuments ON kbdocument_revisions.kbdocument_id = kbdocuments.id ";
to
die($app_strings['ERR_INVALID_FILE_REFERENCE'] . ": " . $local_location);
Provoke the error again and go check if the file exists and is readable.
Vajexa
29 September 2020 14:01
#12
hi , i changed this but same problem …
pls help i need this document usually
pgr
29 September 2020 16:02
#13
What does it print in front of Invalid File Reference when it gives the error screen?