Skip to content

Commit

Permalink
Merge pull request #475 from dragos-dumi/develop
Browse files Browse the repository at this point in the history
#474 - Using GET method when extracting remote file with stream.uri
  • Loading branch information
basdenooijer authored Jan 31, 2017
2 parents 49fb0d3 + b94bc76 commit f8431e5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/Solarium/QueryType/Extract/RequestBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public function build(QueryInterface $query)
$file = $query->getFile();
if (preg_match('/^(http|https):\/\/(.+)/i', $file)) {
$request->addParam('stream.url', $file);
$request->setMethod(Request::METHOD_GET);
} elseif (is_readable($file)) {
$request->setFileUpload($file);
$request->addParam('resource.name', basename($query->getFile()));
Expand Down

0 comments on commit f8431e5

Please sign in to comment.