Opened 10 years ago

Closed 10 years ago

#1215 closed defect (invalid)

Base64 wiki attachments

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


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?


Attachments (0)

Change History (1)

comment:1 Changed 10 years ago by athomas

  • Resolution set to invalid
  • Status changed from new to closed

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.

Add Comment

Modify Ticket

as closed The owner will remain athomas.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.