I need to create a mime attachment for facebooks me/photos post. can’t work out how to do the encoding.
i’ve tried this but no luck
[lua]local mime = {
headers = {
[“content-type”] = ‘image/jpg; name=“screencapture.jpg”’,
[“content-disposition”] = ‘attachment; filename=“screencapture.jpg”’,
[“content-description”] = ‘a screenshot’,
[“content-transfer-encoding”] = “BASE64”
},
body = ltn12.source.chain(
ltn12.source.file(io.open(path, “rb”)),
ltn12.filter.chain(
mime.encode(“base64”),
mime.wrap()
)
)
}[/lua]
any ideas?
thanks
j [import]uid: 6645 topic_id: 8167 reply_id: 308167[/import]