How to automatically name this file while uploading the file

xiaoxiao2021-03-06  21

com.jspsmart.upload.file myfile = mysmartupload.getfiles (). getfile (0);

IF (! myfile.ismissing ()) {

Filename = myfile.getFileName ();

String suffix = filename.substring (filename.lastIndexof ('.'));

Date now = new date ();

FileName = String.Valueof (now.gettime ()) SUFFIX;

URL = "/ Download / UserDoc /" FileName;

// Save the files with its Original Names in a Virtual Path of The Web Server

Myfile.saveas (URL);

转载请注明原文地址:https://www.9cbs.com/read-41662.html

New Post(0)