Smartling / api-sdk-php

SDK for integrating with the Smartling API. The Smartling API allows developers to upload language specific resource files and download the translations of those files for easy integration within their application. http://docs.smartling.com
Apache License 2.0
6 stars 15 forks source link

Support data:// protocol as content for context upload #121

Closed mumia closed 4 years ago

mumia commented 4 years ago

In the process of trying to upload visual context without saving a local file we ran into an issue where the mime type of the content was failing to be determined correctly. Came to realise that this was due to the fact that the stream that is created by fopen from a data:// protocol string does not contain a filename and guzzle fails to determine the correct content-type, but they support reading the file name from a filename parameter in the same multipart.

PavelLoparev commented 4 years ago

Hi @mumia, thanks for the support. Release 3.8.0 includes your change.

mumia commented 4 years ago

Perfect @PavelLoparev, will update our app ASAP. :)