NeatUpload Documentation

InputFile.MoveTo Method 

Moves an uploaded file to a permanent location.

public virtual void MoveTo(
   string path,
   MoveToOptions opts
);

Parameters

path
the permanent location to move the uploaded file to.
opts
options associated with moving the file (e.g. MoveToOptions.Overwrite or MoveToOptions.None

Remarks

The default UploadStorageProvider (a FilesystemUploadStorageProvider) temporarily stores uploaded files on disk. If you don't call MoveTo() in response to the postback, the temporary file will be automatically deleted.

The path you pass to MoveTo() is the filesystem path where you want the uploaded file to be permanently moved. If you want any existing file at that path to be overwritten, pass MoveToOptions.Overwrite as the opts parameter. Otherwise, pass MoveToOptions.None. Only the last call to MoveTo() in response to a particular postback will determine the uploaded file's permanent location.

If you are using a non-default UploadStorageProvider, it might interpret path differently. For example, it might use it as the primary key to identify a row in a database table. A non-default UploadStorageProvider might also allow other options by accepting a subclass of MoveToOptions for the opts parameter.

See Also

InputFile Class | Brettle.Web.NeatUpload Namespace