[Gmod-help] Re: [Gmod-gbrowse] upload file utility from a plugin
Sean O'Keeffe
okeeffe at molgen.mpg.de
Wed Aug 27 08:57:10 EDT 2008
Dave Clements, GMOD Help Desk wrote:
> Hi Sean,
>
>
>> Is this possible, firstly?
>>
>
> Um, I don't know either, but I can't think of a reason why it should
> not be possible.
>
> I've taken a look at your code and don't see anything that is obviously wrong.
>
>
>> It doesn't work but I don't know if it can be applied to my problem.
>>
>
> Can you provide more information on how it doesn't work? Does the
> filename make it from the form into the script? Does the upload
> appear to create a valid filehandle? Does the read make it look like
> an empty file, or an invalid one?
>
> Any extra information on how it fails might help.
>
> Thanks,
>
> Dave C
> GMOD Help Desk
>
> On Fri, Aug 22, 2008 at 2:57 AM, Sean O'Keeffe <okeeffe at molgen.mpg.de> wrote:
>
>> Hi all,
>> I have a question regarding the option to upload a file from within an
>> annotator plugin.
>> The idea is that the user can upload his own TF matrices to search
>> against, using our binding site annotator plugin.
>> Is this possible, firstly?
>>
>> I have attempted something like this:
>>
>> sub reconfigure {
>> my $self = shift;
>> my $config = $self->configuration;
>>
>> $config->{'file'} = upload( 'file' );
>>
>> ..
>>
>> }
>>
>> sub configure_form {
>> my $self = shift;
>> my $config = $self->configuration;
>>
>> ..
>>
>> $page .= TR(td(["Alternatively upload a TF Matrix file: ",
>> filefield(-name=>$self->config_name('file'), -size=>20)]));
>>
>> ..
>> }
>>
>> sub annotate {
>> my $self = shift;
>> my $config = $self->configuration;
>> my $pscm_file = $config->{'file'};
>>
>> ..
>>
>> while ( <$pscm_file> ) {$text .= $_;}
>>
>> ..
>> }
>>
>> This concept I pulled from the ImportFeatures plugin which is a dumper
>> and requires special import verb usage.
>> It doesn't work but I don't know if it can be applied to my problem.
>>
>> Thanks,
>> Sean.
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
>> Build the coolest Linux based applications with Moblin SDK & win great prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Gmod-gbrowse mailing list
>> Gmod-gbrowse at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
>>
>>
>
>
>
>
Hi Dave,
It seems that the filename isn't being passed to the script.
When I do :
foreach my $param ( $self->config_param() ) {
print STDERR "|$param| => |$config->{$param}|\n";
I get :
|file| => ||
Re: Sarah's post - My issue is that I think this is an annotator plugin
issue as opposed to a dumper one (I stand to be corrected on that).
Sean.
More information about the Gmod-help
mailing list