Afrikaans
Akan
Albanian
Amharic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
It's easy to force the browser to download a file.
You can do that using the download method of the response object.
So let's define our fun slash download route to try this out.
We will be calling the response helper function that will return the response object and then we will
call the downloads method of it.
So the first argument is the path to the fire.
Well, let's first get some file to download.
So under this lecture, you will be able to download this image, make sure you copy it and in your
project folder, go to the public folder and just pasted their.
Now back to the code, so the first argument is the path to the file now to actually give the proper
path to your public folder, you can call the public path helper function.
And now inside it, let's just put slash Daniel Jabe jpeg.
Well, the extension, OK.
The second argument is an optional name, the user will see if it needs to be different from the original
filename so it can be, for example, the face jpg and the third is the least of an optional headers
to return.
This is an array, so we won't add any additional headers.
So let's skip that.
Now we are done and we can try it out in the browser, so the URL is fun, download and to download
should be initiated, but it might not be started automatically as this depends on your browser.
You can see on the bottom that might download has actually started if you missed out.
Let's see this again.
I'll type the euro and watch the bottom as it gets downloaded automatically.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.