justic3 Posted November 28, 2014 Share Posted November 28, 2014 Hi, may I know how to disable file to rename? in state of rename can i change to order refence no? if (isset($fileAttachment['rename']) && !empty($fileAttachment['rename']) && rename($fileAttachment['tmp_name'], _PS_UPLOAD_DIR_.basename($fileAttachment['rename']))) { $cm->file_name = $fileAttachment['rename']; @chmod(_PS_UPLOAD_DIR_.basename($fileAttachment['rename']), 0664); } I tried to add $fileAttachment['rename'] = $order->getUniqReference(), before the code above and it works, but the file does not have file extension. How to save the filename as {order reference no} + {tmp_name} Link to comment Share on other sites More sharing options...
Recommended Posts