Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Зуев Егор
/
wiki.dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Younes El Biache
2016-07-09 15:26:53 +0200
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Committed by
GitHub
2016-07-09 15:26:53 +0200
Commit
32a06f119b1c620863acc588b7e90810286737ef
32a06f11
1 parent
10418323
set uploaded files public visibliity (relevant for S3 storage)
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
app/Services/ImageService.php
app/Services/ImageService.php
View file @
32a06f1
...
...
@@ -95,6 +95,7 @@ class ImageService
try
{
$storage
->
put
(
$fullPath
,
$imageData
);
$storage
->
setVisibility
(
$fullPath
,
'public'
);
}
catch
(
Exception
$e
)
{
throw
new
ImageUploadException
(
'Image Path '
.
$fullPath
.
' is not writable by the server.'
);
}
...
...
@@ -167,6 +168,7 @@ class ImageService
$thumbData
=
(
string
)
$thumb
->
encode
();
$storage
->
put
(
$thumbFilePath
,
$thumbData
);
$storage
->
setVisibility
(
$thumbFilePath
,
'public'
);
$this
->
cache
->
put
(
'images-'
.
$image
->
id
.
'-'
.
$thumbFilePath
,
$thumbFilePath
,
60
*
72
);
return
$this
->
getPublicUrl
(
$thumbFilePath
);
...
...
@@ -269,4 +271,4 @@ class ImageService
}
}
\ No newline at end of file
}
...
...
Please
register
or
sign in
to post a comment