    public static function moveTemporaryUploads($content, $destFolder, &$tmpFiles)
    {
        $replace = [];

        $folder = Folder::find_or_make($destFolder);

        /* @var $file File */
        foreach ($tmpFiles as $file) {

            // Keep a copy of the old url to remplace with a new one in the html content
            $oldURL = $file->getURL();

            $name = pathinfo($file->Name, PATHINFO_FILENAME);
            $ext = pathinfo($file->Name, PATHINFO_EXTENSION);

            $file->Name = $name . '_' . time() . '.' . $ext;
            $file->ParentID = $folder->ID;
            $file->write();

            $replace[$oldURL] = $file->getURL();
        }

        $content = str_replace(array_keys($replace), array_values($replace), $content);

        return $content;
    }