I would like to import files in bulk from another system.
The problem is that the files are stored in a location based on a hash key in the field disk_name.
I think this is the code responsible to create the hash:
public static function getUniqueCode($file)
{
if (!$file) {
return null;
}
$hash = md5($file->file_name . '!' . $file->disk_name);
return base64_encode($file->id . '!' . $hash);
}
Is it possible to have the same function in mysql. I found md5 is available and I found a function to have base64_encode availe inside mysql. What is the original $file->disk_name value
Last updated