Jifty::Plugin::Media - Provides upload file and select url for Jifty
Jifty::Plugin::Media is a Jifty plugin to allow managing static files, upload create directory, delete and select url for any media file for your application.
In your Model class schema description, add the following:
column color1 => is Media;
In your jifty config.yml under the framework section:
Plugins: - Media: default_root: files
default_root will be added to Your_app_root/share/web/static/ path Your web process need to have write rights in this directory.
default_root
Your_app_root/share/web/static/
In your Dispatcher manage allowed uploaders :
use strict; use warnings; package TestApp::Dispatcher; use Jifty::Dispatcher -base; before '*' => run { Jifty->api->allow('Jifty::Plugin::Media::Action::ManageFile') if Jifty->web-current_user->is_supersuser; }; before '/media_*' => run { tangent '/access_denied' if ( ! Jifty->web-current_user->is_superuser ); }; 1;
In your View you can access to a manager page '/media_manage_page' or a fragment '/media_manage' usable in a popout link:
'/media_manage_page'
'/media_manage'
hyperlink (label => 'Manage files', onclick => { popout => '/media_manage' });
you can open a repository on load with mediadir argument
mediadir
hyperlink (label => 'Manage files', onclick => { popout => '/media_manage', args => { mediadir => '/images/'} });
or you can change default_root to a sub directory with rootdir argument
rootdir
hyperlink (label => 'Manage files', onclick => { popout => '/media_manage', args => { rootdir => '/images/'} });
load config values, javascript and css
convert accent character to ascii
convert dir name in ascii
convert file name in ascii
Yves Agostini, <yvesago@cpan.org>
Copyright 2010, Yves Agostini.
This program is free software and may be modified and distributed under the same terms as Perl itself.
Embeded jqueryFileTree.js is based on jQuery File Tree from http://abeautifulsite.net/2008/03/jquery-file-tree/
jqueryFileTree.js
Which is dual-licensed under the GNU General Public License and the MIT License and is copyright 2008 A Beautiful Site, LLC.
To install Jifty::Plugin::Media, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Jifty::Plugin::Media
CPAN shell
perl -MCPAN -e shell install Jifty::Plugin::Media
For more information on module installation, please visit the detailed CPAN module installation guide.