4
Thank you.
@ghia .. thx for the link but that did not help me , i already know how to use the uploader class , I just Can not figuer Out how to rename the file to any random name.
@wishcraft .. Thx .. but i do not know how to apply that in my code .
I tried like this.
$prefix = substr(md5(time()),0,7);
$uploader = new XoopsMediaUploader(XOOPS_ROOT_PATH . "/" . "modules/test/upload/", $allowed_mimetypes, $maxfilesize);
if ($uploader->fetchMedia($_POST["xoops_upload_file"][0], $prefix)) {
if (!$uploader->upload()) {
Uploads the file but dose not rename it :)