|All requests||>||upload .txt file||>||Request new recommendation||>||Featured requests||>||No recommendations|
by kavita Rangnath Mane - 3 years ago (2015-11-15)
I need to code for uploading a file.
This class can validate and process one or more file uploads.
There is one class that can validate and process individual file uploads. It checks if the file name extension and MIME type is one of the allowed, as well if the file size is below the allowed size limit.
The class can create the destination directory if it does not exists and move the uploaded file to that directory.
Another class calls the first to validate and process multiple files being uploaded.
You can use the UploadFile() method from the class which allow you to upload file
There are a lot of scripts to handle file uploads, primarily images and image manipulation, which makes them a little more difficult to use if you just want a text file. This class can handle text and images, allows you to restrict files based on their mime type and is fairly simple to use.