Skip to content

Commit

Permalink
Issue #3 Make the URL of a file publicly accessible.
Browse files Browse the repository at this point in the history
  • Loading branch information
judgej committed Aug 1, 2018
1 parent 668dbf1 commit 24dec4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ $content = $filesystem->read('path/to/my/file.txt');
$resource = $filesystem->readResource('path/to/my/file.txt');
$success = $filesystem->createDir('new/directory/here');
$success = $filesystem->rename('path/to/my/file.txt', 'some/other/folder/another.txt');

// The URL of a file can be found like this:

$url = $filesystem->getAdapter()->getUrl('path/to/my/foo.bar');
```

## Testing
Expand Down
2 changes: 1 addition & 1 deletion src/AzureFileAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function __construct(IFile $azureClient, $config = [], $prefix = null)
* @param string $pathName the normalised file pathname
* @return string URL for the file, needed for some API methods
*/
protected function getUrl($pathName)
public function getUrl($pathName)
{
return sprintf(
'%s%s/%s',
Expand Down

0 comments on commit 24dec4f

Please sign in to comment.