1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Max file size for flash uploads

Max file size for flash uploads

6 posts, 0 answered
  1. David
    David avatar
    3 posts
    Registered:
    09 Nov 2007
    14 Jul 2009
    Link to this post
    Hi,

    I have just installed my brand new Sitefinity software and am on my way to getting started. When I am editing a Generic content area in the CMS admin and try to add a flash file I see there is a 200kb limit.

    The message: "Max file size allowed: 200.00 KB" shows.

    I have spent hours trying to work out where this can be raised where is the setting / config entry please and where in the documentation should I have looked.Any help would be very much appreciated.
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    14 Jul 2009
    Link to this post
    Hello David,

    Have you tried with the suggestions from the KB Article : How to enable larger file uploads ?

    I believe this will help.

    Sincerely yours,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. David
    David avatar
    3 posts
    Registered:
    09 Nov 2007
    15 Jul 2009
    Link to this post
    No the article doesnt help, how do I know which config file to change anyway?

    Basically its a brand new installation paid for last week (would I be quicker contacting support and raising a ticket?), I have made no changes other than uploading master pages and creating templates etc.

    My users want to be able to upload flash files > 200kb is there a simple idiots guide / instructions on changing this?

    In the linked article it "suggests" the file:
    ~/Sitefinity/Admin/ControlTemplates/Generic_Content/EditorTemplate.ascx

    This file does not even exist on my installation in my

    "/Sitefinity/Admin/ControlTemplates/Generic_Content/" sirectory I see a folder called "App_LocalResources" and a file called "ContentVersionView.aspx" no file?

    Many thanks for your help.



  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    15 Jul 2009
    Link to this post
    Hello David,

    Thank you for using our services.

    First of let me apologize for pointing you to the not-so-correct information. This KB article relates to an older version of Sitefinity - Sitefinity 3.2 to be more precise. The version that your client is using (Sitefinity 3.6 SP2) has different back-end architecture. One of the differences is that templates for Sitefinity controls have been embedded into the CMS's dlls. However this does not mean that you can not modify those templates to achieve what you want. I will now guide you to modify the template for the Generic Content control, so that you will be able to upload files with size larger than 200 KB using this control.

    Let me start by explaining a little bit about external templates. As I said earlier Sitefinity controls use templates that are embedded into the CMS's dlls. However you can download the ExternalTemplates.zip from your Client.NET account (see attached image). To gain access to the templates for the controls just copy the contents of the Sitefinity folder in the archive to the Sitefinity folder of your project. I would also suggest to view the following blog posts, that relate to using external templates:
    Introduction to ControlsConfig file
    Mapping a control to use external template

    Now you will be able to edit the ~/Sitefinity/Admin/ControlTemplates/Generic_Content/GenericContentDesigner.ascx as described in the KB. Note that the name for the control template is also different than the one in the KB article. Also if you look at the ViewPaths, UploadPaths, and DeletePaths at of the Flash manager you will see that they point to folders that are existent in your project. I recommend that you either create the Files folder in the root of your project, or provide the paths to point to a folder of your desire, like that:
    <FlashManager ViewPaths="~/Your folder for flash Files/" UploadPaths="~/Your folder for flash Files/" DeletePaths="~/Your folder for flash Files/" MaxUploadFileSize="307200"/> 

    Now that you have appropriately modified the ~/Sitefinity/Admin/ControlTemplates/Generic_Content/GenericContentDesigner.ascx, you will have to map the Generic Content Control to use this template. Full guidance on how to do that can be found in the second blog article I gave you. To put it short - you must have a the following file (if not create it) ~/App_Data/Configuration/Telerik.Sitefinity.Configuration.ControlsConfig.xml. You have to add the following view strings for the Generic Content control:
    <?xml version="1.0" encoding="utf-8"?> 
    <controlsConfig> 
      <viewMap> 
      <!--Defines the layout of GenericContentDesigner control.--> 
        <viewSettings hostType="Telerik.Cms.Engine.WebControls.Design.GenericContentDesigner" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Generic_Content/GenericContentDesigner.ascx" /> 
     </viewMap> 
    </controlsConfig> 

    After you have mapped the control to use the external template you will have to restart your web site in order the changes to take effect.

    The web.config file referred to in the KB article is located in the root of your web site (~/web.config).

    I hope you find this information helpful. If you have more questions concerning Sitefinity do not hesitate to contact us.

    Regards,
    Rado
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. David
    David avatar
    3 posts
    Registered:
    09 Nov 2007
    16 Jul 2009
    Link to this post
    Hi, thanks for your very comprehendsive and helpful resposne. I will give that a try.

    Couple of quick (I think) follow ups if possible:

    1. How would I go about modifying the image uploader functionality to allow users to add "Title" attribute text as well as "Alt".

    2. How could I in the same way add the "target" attibute for users when adding hyperlinks?
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    16 Jul 2009
    Link to this post
    Hi David,

    To answer your follow up. You can take a look at the following KB article to see how to add the target="_blank" attribute that can be set from a checkbox in the insert a link dialog.  As for the insert an image dialog it has a text box in which you can set alternative text. It appears right after you upload the image. If you want to implement your custom fields for alt, the logic is the same as for the target=_blank. But in the method initDialog of this:
    if (clientParameters.nodeName && typeof(clientParameters.nodeName) != "undefined" && clientParameters.nodeName == "A") 

    if statement you will have to use this one:
    if (clientParameters.nodeName && typeof(clientParameters.nodeName) != "undefined" && clientParameters.nodeName == "img") 


    I hope that the provided information wil answer your questions. Please feel free to get back to us if you have more.

    All the best,
    Rado
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
6 posts, 0 answered