none
Change sizelimit of photo atribute in FIM Portal RRS feed

Answers

  • The trick is to limit the size of the upload. This can be done with the UocFileUpload control.

    See http://technet.microsoft.com/en-us/library/ee534918%28v=ws.10%29.aspx

    The default maximum is 1Mb but this can be changed with MaxFileSize.

    Wednesday, May 30, 2012 8:50 PM
  • For anyone else in need of the parameter, the value you need to submit is expected in Kb. So if you want to maximize it to 10Kb, the complete parameter would be:

    <my:Propertymy:Name="MaxFileSize"my:Value="10240"/>

    Trying to upload a picture larger that 10Kb wil result in:


    Kind regards,
    Freek Berson
    The Microsoft Platform
    Twitter
    Linked-in
    Wortell company website

    Thursday, May 31, 2012 7:23 AM

All replies

  • The trick is to limit the size of the upload. This can be done with the UocFileUpload control.

    See http://technet.microsoft.com/en-us/library/ee534918%28v=ws.10%29.aspx

    The default maximum is 1Mb but this can be changed with MaxFileSize.

    Wednesday, May 30, 2012 8:50 PM
  • Thanks Fer :-)

    I'll give that a go!


    Kind regards,
    Freek Berson
    The Microsoft Platform
    Twitter
    Linked-in
    Wortell company website

    Wednesday, May 30, 2012 8:51 PM
  • For anyone else in need of the parameter, the value you need to submit is expected in Kb. So if you want to maximize it to 10Kb, the complete parameter would be:

    <my:Propertymy:Name="MaxFileSize"my:Value="10240"/>

    Trying to upload a picture larger that 10Kb wil result in:


    Kind regards,
    Freek Berson
    The Microsoft Platform
    Twitter
    Linked-in
    Wortell company website

    Thursday, May 31, 2012 7:23 AM
  • Hi, 

    Just for my curiosity - You are changing this to comply with AD requirements?  I'm just asking because it is not a technical limitation in AD but kind of advisory to keep these photos below 10kB. If this is actually required and what is recommended size it depends IMO a bit on the size of organization, AD etc. But this is side topic.

    Just to get back on the FIM track - alternative way is to use authorization activity to perform checks on photo uploaded, for example size, dimensions etc. or\and use workflow activity to standardize photos uploaded by users. This is actually what I'm doing at few customer deployments - using workflow activities to trim the size to specific value and re-size pictures to the dimensions specified in activity configuration.

    Just my .02 EUR :) 

    Thursday, May 31, 2012 9:11 AM
  • Hi.... would it be possible for someone to provide a little more detail on where and how to make this change to set this parameter?

    Is this just a matter of editing that field in an existing place or does it require building a custom RCDC built from scratch?  I'm trying to read through that technet link in the answer post #1, but not quite sure what to do.

    Friday, July 6, 2012 9:43 PM
  • I think I may have just found what I was looking for...... hopefully can someone just confirm, when editing the "Configuration for User Editing" RCDC, i see the in configuration data xml this code below..... is it just a matter of adding that additional property string into this section and saving it?  or should i be doing something else for this?

    <my:Control my:Name="PhotoUpload" my:TypeName="UocFileUpload" my:Caption="{Binding Source=schema, Path=Photo.DisplayName}" my:Description=""  my:RightsLevel="{Binding Source=rights, Path=Photo}">
            <my:Properties>
              <my:Property my:Name="MaxHeight" my:Value="100"/>
       <my:Property my:Name="MaxWidth" my:Value="100"/>
              <my:Property my:Name="Required" my:Value="{Binding Source=schema, Path=Photo.Required}"/>
              <my:Property my:Name="ContentType" my:Value="Image"/>
              <my:Property my:Name="AllowedFileTypes" my:Value="*.gif; *.jpg; *.jpeg; *.png; *.bmp; *.tif; *.tiff"/>
              <my:Property my:Name="ImageUrl" my:Value="~/_layouts/images/MSILM2/defaultuserphoto.gif"/>
              <my:Property my:Name="Value" my:Value="{Binding Source=object, Path=Photo, Mode=TwoWay}"/>
              <my:Property my:Name="PromptForNoValue" my:Value="%SYMBOL_PhotoPromptForNoValueCaption_END%"/>
              <my:Property my:Name="AlternateText" my:Value="{Binding Source=schema, Path=Photo.DisplayName}"/>
            </my:Properties>
          </my:Control>

    Friday, July 6, 2012 9:52 PM