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
Dan Brown
2015-12-01 20:26:09 +0000
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
9969698783e3ae3b449134ece67debf8724266e7
99696987
1 parent
b498b60c
Floating page content bugfix and prevent incompatable image uploads. Fixes #26.
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletions
app/Http/Controllers/ImageController.php
resources/assets/js/components/image-manager.vue
resources/assets/sass/_pages.scss
app/Http/Controllers/ImageController.php
View file @
9969698
...
...
@@ -110,7 +110,11 @@ class ImageController extends Controller
public
function
upload
(
Request
$request
)
{
$this
->
checkPermission
(
'image-create'
);
$this
->
validate
(
$request
,
[
'file'
=>
'image|mimes:jpeg,gif,png'
]);
$imageUpload
=
$request
->
file
(
'file'
);
$name
=
str_replace
(
' '
,
'-'
,
$imageUpload
->
getClientOriginalName
());
$storageName
=
substr
(
sha1
(
time
()),
0
,
10
)
.
'-'
.
$name
;
$imagePath
=
'/uploads/images/'
.
Date
(
'Y-m-M'
)
.
'/'
;
...
...
resources/assets/js/components/image-manager.vue
View file @
9969698
...
...
@@ -110,6 +110,12 @@
dz.removeFile(file);
});
});
this.on('error', function(file, errorMessage, xhr) {
if(errorMessage.file) {
$(file.previewElement).find('[data-dz-errormessage]').text(errorMessage.file[0]);
}
console.log(errorMessage);
});
}
});
},
...
...
resources/assets/sass/_pages.scss
View file @
9969698
...
...
@@ -19,12 +19,16 @@
max-width
:
840px
;
overflow-wrap
:
break-word
;
.align-left
{
float
:
left
!
important
;
text-align
:
left
;
}
img
.align-left
,
table
.align-left
{
float
:
left
!
important
;
margin
:
$-xs
$-s
$-xs
0
;
}
.align-right
{
float
:
right
!
important
;
}
img
.align-right
,
table
.align-right
{
text-align
:
right
;
margin
:
$-xs
0
$-xs
$-s
;
}
...
...
Please
register
or
sign in
to post a comment