Reputation: 277
I want to write a program which allows me to download the video of a certain link and store it into database. I am able to retrieve the link of the video but I can't download it into my computer or database. Lets say my link is "www.abcde.com/12345" and when i click this link, I can watch the video. So How do I download/store this video into my database using java ? I read about inputstream, httpconnection and getV , filereader and whatnot but I just dont know where to start.
Upvotes: 0
Views: 1667
Reputation: 991
The link you enter by browser to watch a video is rather not going to be link which you can use in your application to download the content of a file. Link you enter by browser is probably a reference to some web video player
In your java application a link to original resource file with the video content will be neccessary.
Do you really need to store video content in a database?
There are plenty more options (like for example storing only reference to file path)
I reccomend you to read this article https://wiki.postgresql.org/wiki/BinaryFilesInDB
Upvotes: 1