I'm working with the ImageManager in the RadEditor and run across very simple problem -- uploading an image when the directory currently being viewed is empty causes a javascript error that breaks the ImageManager until the page is reloaded. However, if the directory isn't empty, everything works fine.
Surely I am doing something wrong, but I've stripped almost everything out of my code and the issue persists.
Here is my markup:
And the code behind:
If the "/uploads" directory is empty when you go to add an image via the image manager, you get this javascript error after the image is uploaded:
Uncaught Sys.ArgumentOutOfRangeException: Sys.ArgumentOutOfRangeException: MinimumValue should be smaller than maximumValue Parameter name: _minimumValue Actual value was 0.
Anyone seen this before?
Surely I am doing something wrong, but I've stripped almost everything out of my code and the issue persists.
Here is my markup:
<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="ImageMgrTest._Default" %> <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"></asp:Content><asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <asp:ScriptManager ID="ScriptManagerProxy1" runat="server"/> <telerik:RadEditor ID="txtRegText" Width="100%" runat="server" DialogHandlerUrl="~/Telerik.Web.UI.DialogHandler.axd" StripFormattingOnPaste="MSWord"> </telerik:RadEditor></asp:Content>And the code behind:
Public Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim uploadPath As String = "~/uploads" Me.txtRegText.ImageManager.UploadPaths = {uploadPath} Me.txtRegText.ImageManager.ViewPaths = {uploadPath} Me.txtRegText.ImageManager.DeletePaths = {uploadPath} Me.txtRegText.ImageManager.MaxUploadFileSize = 1024 * 1000 Me.txtRegText.ImageManager.SearchPatterns = New String() {"*.jpg", "*.png", "*.gif", "*.jpeg", "*.bmp", "*.tiff"} End SubEnd ClassIf the "/uploads" directory is empty when you go to add an image via the image manager, you get this javascript error after the image is uploaded:
Uncaught Sys.ArgumentOutOfRangeException: Sys.ArgumentOutOfRangeException: MinimumValue should be smaller than maximumValue Parameter name: _minimumValue Actual value was 0.
Anyone seen this before?
