>>Is it possible to have the "FileNameAutoGenerate", i mean the name of the file uploaded will have a name automatically generated ? Then after the file is uploaded, it displays automatically the "FilePath (link to display the file)".
Yes. You need to create a custom file upload handler which allows you rename the uploaded files.
- <?php require_once "phpuploader/include_phpuploader.php" ?>
- <?php
- $uploader=new PhpUploader();
-
- $mvcfile=$uploader->GetValidatingFile();
-
- if($mvcfile->FileName=="accord.bmp")
- {
- $uploader->WriteValidationError("My custom error : Invalid file name. ");
- exit(200);
- }
-
-
-
- $targetfilepath= "savefiles/myprefix_" . $mvcfile->FileName;
- if( is_file ($targetfilepath) )
- unlink($targetfilepath);
- $mvcfile->MoveTo( $targetfilepath );
-
- $uploader->WriteValidationOK();
-
- ?>
asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
asp wysiwyg html editor: http://cutesoft.net/ASP
asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
Live Support: http://cutesoft.net/live-support/default.aspx