Hello, all
This extension places a simple file field on the publish page and allows the user to upload images/documents to the field. It uses the existing upload directories defined and takes their settings, so file type and size restrictions should be valid. Currently there is not an error system, because of the way EE runs it’s output, but i’ll look into something soon. Also you should know that the extension requires JS if you want to remove an image. Without JS it can not be done.
Finally. The “icons” folder goes in your default “images” folder next to the “uploads” directory.
You’ll have to add it as a field the same way you would add a new text field or date field under Admin > Weblog Administration > Custom Fields > Field Group > Add New Custom Field
There’s a serious(?) bug in the extension. Today I have published an article in a weblog that did NOT use the file extension (latest version):
Problems after publishing, but it was published.
I repeated the bug by Edit/Quick Save:
Warning: Invalid argument supplied for foreach() in /usr/home/***/system/extensions/ext.file.php on line 324
Warning: Cannot modify header information - headers already sent by (output started at /usr/home/***/system/extensions/ext.file.php:324) in /usr/home/***/system/core/core.functions.php on line 707
PHP5; the weblog doesn’t use the file field. And I see the font size in the blog in this blog (w/o file field)
Warning: Invalid argument supplied for foreach() in /usr/home/***/system/extensions/ext.file.php on line 324
Warning: Cannot modify header information - headers already sent by (output started at /usr/home/***/system/extensions/ext.file.php:324) in /usr/home/***/system/core/core.functions.php on line 707
Warning: Cannot modify header information - headers already sent by (output started at /usr/home/***/system/extensions/ext.file.php:324) in /usr/home/***/system/core/core.functions.php on line 293
The entry was published. (This weblog/weblog publish page doesn’t use the file field)
I get the same warnings when I use more than one File field.
Also, Formatting for the File field is set to ‘Xhtml’ by default but should be ‘None’ (you can work around this by creating a text field first, set formatting to ‘None’ and then change field type to ‘File’)
should be better now. that’s rather annoying. I’m using Safari on a mac and the post takes forever to publish, but once it goes through it shows me the correct file size, then when I check back the file size is 0? Strange.
I’ve updated the extension again to support multiple files. Enable it in the extension manager by clicking on settings. If you have multiple files enabled you can use the following template structure:
If you’re using this extension in combination with any of my other extensions it is highly recommended that you update all of them or field data may not enter correctly. You can find links to the individual posts below:
Checkbox: http://expressionengine.com/forums/viewthread/38843/
Multi Drop-down List: http://expressionengine.com/forums/viewthread/38370/
Multi Text: http://expressionengine.com/forums/viewthread/39153/
File: http://expressionengine.com/forums/viewthread/38997/
Or you can find a list of them on my docs page: http://docs.markhuot.com