Modify

Opened 10 years ago

Closed 10 years ago

#1215 closed defect (invalid)

Base64 wiki attachments

Reported by: ryanc Owned by: Alec Thomas
Priority: normal Component: XmlRpcPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

The documentation for putAttachment suggests that the attachment data should be sent base64 encoded:

boolean wiki.putAttachment(string path, base64 data)

HOWEVER - nothing on the Trac side even attempts to unencode the data! I spent days trying to figure out why Trac/Python couldn't decode the base64 encoded file from my PHP app. So it's just expecting raw file data that is declared as type "base64".

Shouldn't the file need to be encoded if sending over http?

Ryan

Attachments (0)

Change History (1)

comment:1 Changed 10 years ago by Alec Thomas

Resolution: invalid
Status: newclosed

If you're using an XML-RPC library, like XmlRpcPlugin is, the base64 encoding/decoding will probably be taken care of you. In Python this is handled by the xmlrpclib.loads() function.

Modify Ticket

Action
as closed The owner will remain Alec Thomas.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.