Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gaodeng committed Mar 28, 2018
1 parent c858644 commit 16cf13b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Publiux/laravelcdn/CdnFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private function init()
public function asset($path)
{
// if asset always append the public/ dir to the path (since the user should not add public/ to asset)
return $this->generateUrl($path, 'public/');
return $this->generateUrl($path, '');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Publiux/laravelcdn/Providers/AwsS3Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function upload($assets)
// the bucket name
'Bucket' => $this->getBucket(),
// the path of the file on the server (CDN)
'Key' => $this->supplier['upload_folder'] . str_replace('\\', '/', $file->getPathName()),
'Key' => $this->supplier['upload_folder'] .preg_replace('/^public\//',"",str_replace('\\', '/', $file->getPathName())),
// the path of the path locally
'Body' => fopen($file->getRealPath(), 'r'),
// the permission of the file
Expand Down

0 comments on commit 16cf13b

Please sign in to comment.