Discussion:
[jifty-devel] Upload field broken in trunk
Stanislav Sinyagin
2010-02-11 14:51:46 UTC
Permalink
hi,

it works in Jifty-0.91117 from CPAN, and in the current trunk it's broken:

use Jifty::Action schema
{
param 'upload_file' =>
label is 'Upload file',
render as 'Upload',
;
.....

sub take_action
{
my $self = shift;

my $filehandle = $self->argument_value('upload_file');

at this point I cannot read from the file handle. It looks like the filehandle closes immediately after opening.


I'm running lighthttpd+fcgi on a Linux box.
Jesse Vincent
2010-02-12 15:03:06 UTC
Permalink
Post by Stanislav Sinyagin
hi,
use Jifty::Action schema
{
param 'upload_file' =>
label is 'Upload file',
render as 'Upload',
;
.....
sub take_action
{
my $self = shift;
my $filehandle = $self->argument_value('upload_file');
at this point I cannot read from the file handle. It looks like the filehandle closes immediately after opening.
I'm running lighthttpd+fcgi on a Linux box.
Hm. Is TestApp::Uploads still passing its tests for you in trunk?
Stanislav Sinyagin
2010-02-25 13:24:45 UTC
Permalink
----- Original Message ----
Sent: Fri, February 12, 2010 4:03:06 PM
Subject: Re: [jifty-devel] Upload field broken in trunk
Post by Stanislav Sinyagin
hi,
use Jifty::Action schema
{
param 'upload_file' =>
label is 'Upload file',
render as 'Upload',
;
.....
sub take_action
{
my $self = shift;
my $filehandle = $self->argument_value('upload_file');
at this point I cannot read from the file handle. It looks like the filehandle
closes immediately after opening.
Post by Stanislav Sinyagin
I'm running lighthttpd+fcgi on a Linux box.
Hm. Is TestApp::Uploads still passing its tests for you in trunk?
yep, the tests were ok.
The snapshot version that I used:

# git log
commit f2640eb4c36038f5e293d76d3d6aa44f36e60efb
Author: Jesse Vincent <***@bestpractical.com>
Date: Fri Feb 5 09:01:39 2010 -0800
Shawn M Moore
2010-04-01 18:42:31 UTC
Permalink
Hi Stanislav,
Post by Stanislav Sinyagin
hi,
I've added a failing test that tries to trigger this same bug. It's
t/TestApp-Uploads/t/back-compat.t added by 76a1f6b6.

Does this new test fail for you? If not, could you tweak it so that it
better matches the actual action you use?

If you could git bisect Jifty to see which revision broke it for you,
that would be useful in debugging.
Post by Stanislav Sinyagin
I'm running lighthttpd+fcgi on a Linux box.
I wonder if it's an inconsistency in Plack..

Shawn
Stanislav Sinyagin
2010-04-01 19:57:06 UTC
Permalink
hi Shawn,

I think it happened before Plack was introduced.
I will check it out in details soon.





________________________________
From: Shawn M Moore <***@bestpractical.com>
To: jifty-***@lists.jifty.org
Sent: Thu, April 1, 2010 8:42:31 PM
Subject: Re: [jifty-devel] Upload field broken in trunk

Hi Stanislav,
Post by Stanislav Sinyagin
hi,
I've added a failing test that tries to trigger this same bug. It's
t/TestApp-Uploads/t/back-compat.t added by 76a1f6b6.

Does this new test fail for you? If not, could you tweak it so that it
better matches the actual action you use?

If you could git bisect Jifty to see which revision broke it for you,
that would be useful in debugging.
Post by Stanislav Sinyagin
I'm running lighthttpd+fcgi on a Linux box.
I wonder if it's an inconsistency in Plack..

Shawn
Stanislav Sinyagin
2010-07-15 12:51:19 UTC
Permalink
hi,

the problem with file uploads still persists in the git head.

Somehow "make test" produces too many failures on most of the tests, like these:

t/TestApp-Uploads/t/back-compat.t ...................... Undefined subroutine
&main::isa_ok called at t/TestApp-Uploads/t/back-compat.t line 9.
# Looks like your test exited with 255 before it could output anything.
t/TestApp-Uploads/t/back-compat.t ...................... Dubious, test returned
255 (wstat 65280, 0xff00)





----- Original Message ----
Post by Stanislav Sinyagin
Sent: Thu, April 1, 2010 8:42:31 PM
Subject: Re: [jifty-devel] Upload field broken in trunk
Hi Stanislav,
hi,
it works in Jifty-0.91117 from CPAN, and in the current trunk it's
I've added a failing test that tries to trigger this same bug. It's
t/TestApp-Uploads/t/back-compat.t added by 76a1f6b6.
Does this new test fail for you? If not, could you tweak it so that it
better matches the actual action you use?
If you could git bisect Jifty to see which revision broke it for you,
that would be useful in debugging.
I'm running lighthttpd+fcgi on a Linux box.
I wonder if it's an inconsistency in Plack..
Shawn
_______________________________________________
jifty-devel mailing list
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
Stanislav Sinyagin
2010-07-15 13:03:55 UTC
Permalink
actually I fixed the problem now.

Inside take_action(), I used to have

my $filehandle = $self->argument_value('upload_file');
my $parser = new Spreadsheet::ParseExcel;
my $workbook = $parser->Parse($filehandle);

It appears that now $filehandle contains a Jifty::Web::FileUpload object, and
it fails to return its filehandle through the overloaded methods.

After replacing the last line to
my $workbook = $parser->Parse($filehandle->filehandle());
it works again.

I don't know what kind of object was returned by argument_value in the old past.










----- Original Message ----
Post by Stanislav Sinyagin
Sent: Thu, April 1, 2010 8:42:31 PM
Subject: Re: [jifty-devel] Upload field broken in trunk
Hi Stanislav,
hi,
it works in Jifty-0.91117 from CPAN, and in the current trunk it's
I've added a failing test that tries to trigger this same bug. It's
t/TestApp-Uploads/t/back-compat.t added by 76a1f6b6.
Does this new test fail for you? If not, could you tweak it so that it
better matches the actual action you use?
If you could git bisect Jifty to see which revision broke it for you,
that would be useful in debugging.
I'm running lighthttpd+fcgi on a Linux box.
I wonder if it's an inconsistency in Plack..
Shawn
_______________________________________________
jifty-devel mailing list
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
Thomas Sibley
2010-07-15 13:20:58 UTC
Permalink
Pre-Plack, it was probably a CGI.pm Fh object.
Post by Stanislav Sinyagin
actually I fixed the problem now.
Inside take_action(), I used to have
my $filehandle = $self->argument_value('upload_file');
my $parser = new Spreadsheet::ParseExcel;
my $workbook = $parser->Parse($filehandle);
It appears that now $filehandle contains a Jifty::Web::FileUpload object, and
it fails to return its filehandle through the overloaded methods.
After replacing the last line to
my $workbook = $parser->Parse($filehandle->filehandle());
it works again.
I don't know what kind of object was returned by argument_value in the old past.
----- Original Message ----
Post by Stanislav Sinyagin
Sent: Thu, April 1, 2010 8:42:31 PM
Subject: Re: [jifty-devel] Upload field broken in trunk
Hi Stanislav,
hi,
it works in Jifty-0.91117 from CPAN, and in the current trunk it's
I've added a failing test that tries to trigger this same bug. It's
t/TestApp-Uploads/t/back-compat.t added by 76a1f6b6.
Does this new test fail for you? If not, could you tweak it so that it
better matches the actual action you use?
If you could git bisect Jifty to see which revision broke it for you,
that would be useful in debugging.
I'm running lighthttpd+fcgi on a Linux box.
I wonder if it's an inconsistency in Plack..
Shawn
_______________________________________________
jifty-devel mailing list
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
_______________________________________________
jifty-devel mailing list
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
Continue reading on narkive:
Loading...