WIP installer refactor, image uploader check for valid image

[TFS Changeset #77173]
This commit is contained in:
starfighter83
2010-09-14 11:29:23 +00:00
parent e5d1d481c1
commit 18488563fa
3 changed files with 12 additions and 1 deletions

View File

@@ -155,6 +155,7 @@
<asp:Button ID="bt_upload" runat="server" Text="Upload"
onclick="bt_upload_Click" /><br />
<asp:Literal ID="lit_notvalid" runat="server" Text="Please upload a valid image file" Visible="false"></asp:Literal>
<br />

View File

@@ -25,6 +25,7 @@ namespace umbraco.presentation.umbraco.LiveEditing.Modules.SkinModule
{
if (FileUpload1.HasFile)
{
lit_notvalid.Visible = false;
Guid g = Guid.NewGuid();
DirectoryInfo updir = new DirectoryInfo(IO.IOHelper.MapPath("~/media/upload/" + g));
@@ -62,7 +63,7 @@ namespace umbraco.presentation.umbraco.LiveEditing.Modules.SkinModule
}
}
else
throw new Exception("Not a valid image");
lit_notvalid.Visible = true;
}
}

View File

@@ -129,6 +129,15 @@ namespace umbraco.presentation.umbraco.LiveEditing.Modules.SkinModule {
/// </remarks>
protected global::System.Web.UI.WebControls.Button bt_upload;
/// <summary>
/// lit_notvalid control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal lit_notvalid;
/// <summary>
/// pnl_crop control.
/// </summary>