Modify ↓
Opened 18 years ago
Closed 18 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)
Note: See
TracTickets for help on using
tickets.
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.