[dancer-users] Code behaves differently on digitalocean.

Gabor Szabo gabor at szabgab.com
Sun Jan 10 06:30:35 GMT 2016

No idea here, just a few point to try to track down the issue:

Do you use the same version of Perl? The same version of Dancer?
Do you launch the app the same way on both places or do you, for example,
use plackup on your development machine and
Starman on the server?

Try to eliminate any difference between the two setups and see if at some
point it starts working on the server.
(Or stops working on the development machine as well :)


On Sun, Jan 10, 2016 at 3:35 AM, Richard Reina <gatorreina at gmail.com> wrote:

> This code works (the file uploads) when I run it from my web app on my
> local host. However, it does not when I try it on the digitalocean version
> of my app. I get no errors and $file->copy_to($destination) returns true.
> But the file does not upload. Anyone have an idea as to what the problem
> could be?
> post '/upload' => sub {
>     my $user_id = session 'UID';
>     my $d_filename = 'user_' . $user_id . '.jpg';
>     my $file = request->upload('file');
>         my $tmpname = $file->tempname;
>         my $destination = $upload_dir . '/' . $d_filename;
>         my ($crslt) = $file->copy_to($destination) || warn $!;
>         unlink $tmpname if -e $tmpname;
>         debug "crslt: ", $crslt;
>       template 'upload';
>     redirect '/playerdash';
> };
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20160110/81b45c1f/attachment.html>

More information about the dancer-users mailing list