Drupal 8 file download tracking
I would not like to directly expose the file location. It will not show the actual file path to the user. In the end, you'd need a solution that ensures a BinaryFileResponse from a controller, you can see an example in my module. You will want to create a route and controller for this. Then render the link via the route in a block. You could also have a form whos submit handler calls the route with required filename. Also note: I added this here due to the title of the OP issue Might save someone some time in the future when googling 'Drupal 8 file download link'.
Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. How do I create a file download URL?
Ask Question. Asked 3 years, 10 months ago. Active 2 years, 5 months ago. Viewed 12k times. Improve this question. Add a comment.
Active Oldest Votes. If you just have a file field, you're basically looking at what private files option does. Improve this answer. Improve this answer. VJamie 3 3 silver badges 14 14 bronze badges. Bon Kim Bon Kim 11 2 2 bronze badges.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Who owns this outage?
Building intelligent escalation chains for modern SRE. Podcast Who is building clouds for the independent developer? Featured on Meta. Now live: A fully responsive profile. Reducing the weight of our footer. Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled.
0コメント