Skip to content

Commit

Permalink
Add support for files upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Romain Monteil committed Dec 12, 2018
1 parent 88a62b2 commit 3065dfe
Show file tree
Hide file tree
Showing 40 changed files with 1,715 additions and 154 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
!var/sessions/.gitkeep
/public/build/fonts/glyphicons-*
/public/build/images/glyphicons-*
/public/uploads/

###> symfony/framework-bundle ###
/.env
Expand Down
6 changes: 6 additions & 0 deletions assets/scss/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -332,3 +332,9 @@ body#blog_search .post-metadata {
font-size: 16px;
margin-bottom: 8px;
}

/* Page: 'User edit'
------------------------------------------------------------------------- */
body#user_edit #main form .form-group .thumbnail {
max-width: 150px;
}
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parameters:
# This parameter defines the codes of the locales (languages) enabled in the application
app_locales: en|fr|de|es|cs|nl|ru|uk|ro|pt_BR|pl|it|ja|id|ca|sl|hr|zh_CN|bg|tr
app.notifications.email_sender: anonymous@example.com
app.uploader_directory: '%kernel.project_dir%/public/uploads'

services:
# default configuration for services in *this* file
Expand Down Expand Up @@ -32,3 +33,10 @@ services:
# 'arguments' key and define the arguments just below the service class
App\EventSubscriber\CommentNotificationSubscriber:
$sender: '%app.notifications.email_sender%'

App\EventSubscriber\UploadSubscriber:
tags:
- { name: doctrine.event_subscriber, connection: default }

App\Utils\FileUploader:
$uploadPath: '%app.uploader_directory%'
Binary file modified data/database.sqlite
Binary file not shown.
Binary file modified data/database_test.sqlite
Binary file not shown.
File renamed without changes.
42 changes: 42 additions & 0 deletions public/build/1.334d931a.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions public/build/entrypoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@
"entrypoints": {
"js/app": {
"js": [
"/build/vendors~70e61e62.fcea2503.js",
"/build/vendors~d0214e58.2af2529d.js",
"/build/js/app.23ef4f60.js"
"/build/0.830d5dde.js",
"/build/2.dbd2ede0.js",
"/build/js/app.94a89bad.js"
]
},
"js/login": {
"js": [
"/build/vendors~70e61e62.fcea2503.js",
"/build/js/login.7c1fc2ac.js"
"/build/0.830d5dde.js",
"/build/js/login.6ba86fdc.js"
]
},
"js/admin": {
"js": [
"/build/vendors~70e61e62.fcea2503.js",
"/build/vendors~4ab51824.7f92ab17.js",
"/build/js/admin.256a9071.js"
"/build/0.830d5dde.js",
"/build/1.334d931a.js",
"/build/js/admin.f04211d0.js"
]
},
"js/search": {
"js": [
"/build/vendors~70e61e62.fcea2503.js",
"/build/js/search.ef0a5a34.js"
"/build/0.830d5dde.js",
"/build/js/search.171909a9.js"
]
},
"css/app": {
"css": [
"/build/css/app.4aa95248.css"
"/build/css/app.38ae95b3.css"
]
},
"css/admin": {
Expand Down
1 change: 0 additions & 1 deletion public/build/js/admin.256a9071.js

This file was deleted.

1 change: 1 addition & 0 deletions public/build/js/admin.f04211d0.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion public/build/js/app.23ef4f60.js

This file was deleted.

Loading

0 comments on commit 3065dfe

Please sign in to comment.