Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Item15145: make uploads available in json rpc
  • Loading branch information
MichaelDaum committed Jun 16, 2022
1 parent 87551aa commit 8dca49b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions JsonRpcContrib/.gitignore
@@ -1,6 +1,7 @@
*,v
*,pfv
*.gz
*.swp
/JsonRpcContrib.md5
/JsonRpcContrib.sha1
/JsonRpcContrib.tgz
Expand Down
26 changes: 24 additions & 2 deletions JsonRpcContrib/lib/Foswiki/Contrib/JsonRpcContrib/Request.pm
Expand Up @@ -33,7 +33,7 @@ sub new {

my $request = $session->{request};

my $this = bless( {}, $class );
my $this = bless( { session => $session, }, $class );

# get json-rpc request object
my $data = $request->param('POSTDATA');
Expand Down Expand Up @@ -147,6 +147,27 @@ sub version {
return $this->{data}{jsonrpc};
}

##############################################################################
sub uploads {
my $this = shift;

return $this->{session}{request}->uploads(@_);
}

##############################################################################
sub upload {
my $this = shift;

return $this->{session}{request}->upload(@_);
}

##############################################################################
sub uploadInfo {
my $this = shift;

return $this->{session}{request}->uploadInfo(@_);
}

##############################################################################
sub id {
my ( $this, $value ) = @_;
Expand Down Expand Up @@ -201,7 +222,8 @@ sub json {
# static
sub writeDebug {
print STDERR "JsonRpcContrib::Request - $_[0] \n";
Foswiki::Func::writeDebug("- JsonRpcContrib::Request - $_[0]");

#Foswiki::Func::writeDebug("- JsonRpcContrib::Request - $_[0]");
}

###############################################################################
Expand Down

0 comments on commit 8dca49b

Please sign in to comment.