Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 306948 Details for
Bug 445607
RFE: XML-RPC method bug.setAttachmentsMIMETypes(bug.structData["attachments"])
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Sample perl script showing use of bugzilla.updateAttachMimeType()
updateAttachMimeType_xmlrpc.pl (text/plain), 1.35 KB, created by
David Lawrence
on 2008-05-28 16:45:01 UTC
(
hide
)
Description:
Sample perl script showing use of bugzilla.updateAttachMimeType()
Filename:
MIME Type:
Creator:
David Lawrence
Created:
2008-05-28 16:45:01 UTC
Size:
1.35 KB
patch
obsolete
>#!/usr/bin/perl -w > >use XMLRPC::Lite; >use Data::Dumper; >use HTTP::Cookies; > >################################### >## Need to login first # >#################################### > >my $username = shift; >my $password = shift; > >my $cookie_jar = new HTTP::Cookies( file => "/tmp/lwp_cookies.dat" ); > >my $rpc = new XMLRPC::Lite( > proxy => 'https://bz-web2-test.devel.redhat.com/xmlrpc.cgi' ); > >$rpc->transport->cookie_jar($cookie_jar); > ># Use this for 3.2 ># my $call = $rpc->call( 'User.login', ># { login => $username, password => $password } ); > ># Use this for 2.18 >my $call = $rpc->call( 'bugzilla.login', $username, $password ); > >if ( $call->faultstring ) { > print $call->faultstring . "\n"; > exit; >} > ># Save the cookies in the cookie file >$rpc->transport->cookie_jar->extract_cookies( > $rpc->transport->http_response ); >$rpc->transport->cookie_jar->save; > >print "Successfully logged in.\n"; > >################################### ># Main call here # >################################### > >my $bugid = shift; > >my $data = { > 'attach_id' => '304253', > 'mime_type' => 'text/plain', > 'nomail' => 0, >}; > >$call = $rpc->call( 'bugzilla.updateAttachMimeType', $data, $username, $password ); > >my $result = ""; >if ( $call->faultstring ) { > print $call->faultstring . "\n"; > exit; >} >else { > $result = $call->result; >} > >print Dumper($result);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 445607
:
304813
|
306946
|
306947
| 306948 |
307011
|
307012