private void Upload()
{
string extension = Path.GetExtension(this.PostedFile.FileName);
if (extension == null || extension.ToLower() != ".zip")
{
Log.Warning("Could not upload theme because the uploaded file {file} has invalid extension.",
this.PostedFile.FileName);
throw new ThemeUploadException("Could not upload theme because the uploaded file has invalid extension.");
}
var stream = this.PostedFile.InputStream;
using (var fileStream = File.Create(this.ArchivePath))
{
stream.CopyTo(fileStream);
}
}