Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ class Service extends Component implements ServiceInterface
public $defaultAcl = '';

/** @var array S3Client config */
protected $clientConfig = ['version' => '2006-03-01'];
protected $clientConfig = [
'version' => '2006-03-01',
'endpoint' => 'https://nyc3.digitaloceanspaces.com',
];

/** @var array */
private $components = [];
Expand Down
6 changes: 3 additions & 3 deletions src/handlers/UploadCommandHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use frostealth\yii2\aws\s3\commands\UploadCommand;
use frostealth\yii2\aws\s3\base\handlers\Handler;
use GuzzleHttp\Psr7;
use GuzzleHttp\Psr7\Utils;
use Psr\Http\Message\StreamInterface;

/**
Expand Down Expand Up @@ -45,9 +45,9 @@ public function handle(UploadCommand $command)
protected function sourceToStream($source): StreamInterface
{
if (is_string($source)) {
$source = Psr7\try_fopen($source, 'r+');
$source = Utils::try_fopen($source, 'r+');
}

return Psr7\stream_for($source);
return Utils::stream_for($source);
}
}