NAME CGI::Application::Plugin::AJAXUpload - Run mode to handle a
file upload and return a JSON response VERSION This document
describes CGI::Application::Plugin::AJAXUpload version 0.0.3
SYNOPSIS use MyWebApp; use CGI::Application::Plugin::JSON
qw(to_json); use CGI::Application::Plugin::AJAXUpload; sub setup
{ my $c = shift;
$c->ajax_upload_httpdocs('/var/www/vhosts/mywebapp/httpdocs');
$c->ajax_upload_setup( run_mode=>'file_upload',
upload_subdir=>'/img/uploads', ); return; } DESCRIPTION This
module provides a customisable run mode that handles a file
upload and responds with a JSON message like the following:
{status: 'UPLOADED', image_url: '/img/uploads/666.png'} or on
failure {status: 'The image was too big.'} This is specifically
intended to provide a CGI::Application based back end for 's to
the . However as far as I can see it could be used as a back end
for any CGI::Application website that uploads files behind the
scenes using AJAX. In any case this module does NOT provide any
of that client side cod