Upload folder structure

Upload folder structure was changed in version 12 of Sugar. The customizations has to be modified in case of direct access to the file with guid from the folder.

New structure: upload/<3char> directories e.g upload/394/e2a18394-da7f-11e9-8a56-06c3e8e0c8ed

In case your upload folder is still has old structure after the upgrade due to some reason. Please execute this Sugar written script to resolve the issue.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
define('sugarEntry', true);
define('ENTRY_POINT_TYPE', 'api');
require_once 'include/entryPoint.php';
$logger = LoggerManager::getLogger();
$sapi_type = php_sapi_name();
if (substr($sapi_type, 0, 3) != 'cli') {
$logger->fatal('Invalid Call to CLI script');
exit(1);
}
$GLOBALS['current_user'] = BeanFactory::getBean('Users', 1);
global $db, $timedate;
writeLog("-----------------------------------------------");
writeLog("Start " . date('Y-m-d h:i:s'));
writeLog("-----------------------------------------------");
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Create php file and Go to sugar root directory and run php file from cli

Parents
  • Thank you  

    This is good to know!  Our upload directory is so huge that it is mounted, and we usually unmount it before an upgrade.

    We're working towards v12, sadly behind on upgrades...

    FrancescaS

Reply
  • Thank you  

    This is good to know!  Our upload directory is so huge that it is mounted, and we usually unmount it before an upgrade.

    We're working towards v12, sadly behind on upgrades...

    FrancescaS

Children
No Data