But not what I was expecting. I was expecting this to be a tool that would let you draw random shapes and simulate them in a wind tunnel. Wind tunnel software simulation. ![]() Configuration The following settings can be done in the site_properties. (please use string properties only!): • ul_auto_upload -- true/false (default: false) Set to true if you would like the files to be uploaded when they are selected. • ul_allow_multi -- true/false (default: true) Set to true if you want to allow multiple file uploads. ![]() Limit Number Of Files In A Directory• ul_sim_upload_limit -- number 1-n (default: 4) A limit to the number of simultaneous uploads you would like to allow. • ul_queue_size_limit -- number 1-n (default: 999) A limit to the number of files you can select to upload in one go. • ul_size_limit -- size in bytes (default: empty) A number representing the limit in bytes for each upload. • ul_file_description -- text (default: empty) The text that will appear in the file type drop down at the bottom of the browse dialog box. • ul_file_extensions -- list of extensions (default: *.*;) A list of file extensions you would like to allow for upload. Format like *.ext1;*.ext2;*.ext3. Uploadify ExamplesA limit to the number of files you can select to upload in. Create a file called collective.uploadify-configure.zcml in the /path/to/instance/etc/package-includes. A limit to the number of simultaneous uploads you would like to allow. Ul_queue_size_limit – number 1-n (default: 999) A limit to the number of files you can select to upload in one go. FileDesc is required when using this option. • ul_button_text -- text (default: BROWSE) The text you would like to appear on the default button. • ul_button_image -- path to image (default: empty) The path to the image you will be using for the browse button. NOTE: If you are using a **different sized button image* you have to set ul_height and ul_width otherwise your ul_button_image will be stretched to the defaults (110x30)* • ul_hide_button -- true/false (default: false) Set to true if you want to hide the button image. • ul_script_access -- always/sameDomain (default: sameDomain) The access mode for scripts in the flash file. If you are testing locally, set to `always`. • ul_width -- number (default: 110) The ul_width value which should be set when using a different sized ul_button_image • ul_height -- number (default: 30) The ul_height value which should be set when using a different sized ul_button_image • ul_scale_image_size -- x,y These two values define the max x,y size in pixels of the image. Scales an image down to at most ul_scale_image_size size preserving aspect ratio. Example: 800,600 to set a maximum size of 800x600 pixels • ul_content_field -- Contenttype.field The uploaded file is included into the specific field from the specific Contenttype Example: File.file it uploads to field file from the contenttype File. Example A simple utility which adds a 'photo-' prefix to image filenames configure.zcml: utility.py: from zope import interface def prefix_image_filename(file_name, file_data, content_type): '' Prefix all images with 'photo-' '' # we only handle image files if not content_type.startswith('image'): return (file_name, file_data, content_type) if not file_name.startswith('photo'): file_name = '-'.join(['photo', file_name]) return (file_name, file_data, content_type) interface.directlyProvides(prefix_image_filename, IFileMutator). Customization for specific BrowserLayer If you have your own skin installed which is based on it's own BrowserLayer (by default IThemeSpecific) and want to customize the look and feel of collective.uploadify's you could override the upload view and/or the upload initialize callback view • Customize view template:. Collective.uploadify Installation To install collective.uploadify into the global Python environment (or a workingenv), using a traditional Zope 2 instance, you can do this: • When you're reading this you have probably already run easy_install collective.uploadify. Find out how to install setuptools (and EasyInstall) here: • If you are using Zope 2.9 (not 2.10), get and install it via: python setup.py install --home /path/to/instance into your Zope instance.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |