This documentation is for the old version. Go to the latest Upload Suite docs

SourceFileInfo Class

This class provides an access to the uploaded source file, its characteristics, and allows saving it on a server.

The following tables list the members exposed by the UploadedFiles type.

Properties

Name Description
public property getContentLength() Gets the value of the Content-length HTTP header.
public property getContentType() Gets the value of the Content-type HTTP header.
public property getCreatedDateTime() Gets creation date of the source file.
public property getFileName() Gets name of the source file received on the server.
public property getFileSize() Gets size of the source file.
public property getHashCodeMD2() Gets MD2 hash value calculated for the source file.
public property getHashCodeMD5() Gets MD5 hash value calculated for the source file.
public property getHashCodeSHA() Gets SHA hash value calculated for the source file.
public property getHeight() Gets height of the source file.
public property getHorizontalResolution() Gets horizontal resolution of the source file.
public property getModifiedDateTime() Gets last modification date of the source file.
public property getVerticalResolution() Gets vertical resolution of the source file.
public property getWidth() Gets width of the source file.

Methods

Name Description
public method getSafeFileName($dirPath) Returns a safe file name for the file if it would be saved to dirPath folder.
public method save($filename) Saves the source file to the specified path.
public method saveToFolder($dirPath, $renameConflicted) Saves the source file to the specified directory on a server avoiding name conflict.
public method validateHashCodeMD5() Compares value returned by the getHashCodeMD5() method and MD5 hash code calculated for the source file server-side.
public method validateHashCodeSHA() Compares value returned by the getHashCodeSHA() method and SHA hash code calculated for the source file server-side.