Skip to content

Commit

Permalink
make download link work via asset bundle (might be too much what came…
Browse files Browse the repository at this point in the history
… in with this commit!!!)
  • Loading branch information
makomweb committed Jun 17, 2021
1 parent d897826 commit a1bbfa6
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@

/.idea/*
/public/uploads/*

###> symfony/webpack-encore-pack ###
/node_modules/
/public/build/
npm-debug.log
yarn-error.log
###< symfony/webpack-encore-pack ###
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"doctrine/doctrine-migrations-bundle": "^3.1",
"doctrine/orm": "^2.9",
"sensio/framework-extra-bundle": "^6.1",
"symfony/asset": "5.3.*",
"symfony/console": "5.3.*",
"symfony/dotenv": "5.3.*",
"symfony/flex": "^1.3.1",
Expand All @@ -23,6 +24,7 @@
"symfony/security-csrf": "5.3.*",
"symfony/twig-bundle": "5.3.*",
"symfony/uid": "5.3.*",
"symfony/webpack-encore-pack": "^1.0",
"symfony/yaml": "5.3.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
Expand Down
101 changes: 100 additions & 1 deletion composer.lock

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

12 changes: 12 additions & 0 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@
"symfony/amqp-messenger": {
"version": "v5.3.0"
},
"symfony/asset": {
"version": "v5.3.0"
},
"symfony/cache": {
"version": "v5.3.0"
},
Expand Down Expand Up @@ -355,6 +358,15 @@
"symfony/var-exporter": {
"version": "v5.3.0"
},
"symfony/webpack-encore-pack": {
"version": "1.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.0",
"ref": "e18b0c550c3ee79142dc314b3e38193caafe4bb5"
}
},
"symfony/yaml": {
"version": "v5.3.0"
},
Expand Down
2 changes: 1 addition & 1 deletion templates/file_upload/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{% endif %}
</td>
<td>
<a href="{{ path('clear-uploads') }}" class="btn btn-outline-primary btn-sm">Download</a>
<a href="{{ asset('uploads/') }}{{ upload.name }}" class="btn btn-outline-primary btn-sm">Download</a>
</td>
</tr>
{% endfor %}
Expand Down

0 comments on commit a1bbfa6

Please sign in to comment.