Skip to content

Instantly share code, notes, and snippets.

@ispyhumanfly
Created November 13, 2014 21:48
Show Gist options
  • Save ispyhumanfly/19043d340d78385ea624 to your computer and use it in GitHub Desktop.
Save ispyhumanfly/19043d340d78385ea624 to your computer and use it in GitHub Desktop.
Example of using Mojo's upload handling...
if ($self->req->upload('photos')) {
push @photos,
process_photo($self->req->upload('photos'), $new_content->id);
$MODEL->resultset('Content')->search({id => $new_content->id})
->update({photos => "@photos"})
if scalar @photos >= 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment