Support rendering previews with data: URLs in them (#11767)

Images which are data URLs will no longer break URL
previews and will properly be "downloaded" and
thumbnailed.
This commit is contained in:
Patrick Cloke 2022-01-24 08:58:18 -05:00 committed by GitHub
parent c3040dd5cc
commit 807efd26ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 299 additions and 74 deletions

View file

@ -313,7 +313,7 @@ def make_request(
req = request(channel, site)
req.content = BytesIO(content)
# Twisted expects to be at the end of the content when parsing the request.
req.content.seek(SEEK_END)
req.content.seek(0, SEEK_END)
if access_token:
req.requestHeaders.addRawHeader(