Java: How Can Write A File on Internet To A SQL Blob Field Directly? - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › Java: How Can Write A File on Internet To A SQL Blob Field Directly? (1471 Views)
| Java: How Can Write A File on Internet To A SQL Blob Field Directly? by Desyner(op): 10:58pm On Oct 13, 2017*. Modified: 11:44pm On Oct 14, 2017 |
I want to write files directly from the internet via a URL object into a Blob field in MySQL. I don't want to store it as a normal file with extension before writing it to the DB. Has anyone done this before? If yes, I need it. |
| Re: Java: How Can Write A File on Internet To A SQL Blob Field Directly? by Nobody: 4:50am On Oct 14, 2017 |
What do u mean file. Files have extensions. Mysql is a column db. Besides that your using "insert into ...." See w3c |
| Re: Java: How Can Write A File on Internet To A SQL Blob Field Directly? by Nobody: 1:15pm On Oct 14, 2017 |
Check this reference http://www.java2s.com/Code/Java/Database-SQL-JDBC/StoreBLOBsdataintodatabase.htm |
| Re: Java: How Can Write A File on Internet To A SQL Blob Field Directly? by Desyner(op): 11:35pm On Oct 14, 2017 |
proxy20:Oga that's not what I am looking for. I am looking for one that reads inputStream from a URL object directly in the Insert PreparedStatement. The one you provided is the simple and common way. I am not guaranteed full file io access when hosting my app so want to play safe by reading from the internet (URL Object) into SQL blob column. |
| Re: Java: How Can Write A File on Internet To A SQL Blob Field Directly? by ehinorlive: 12:33am On Oct 15, 2017 |
download the file from internet store it as a variable or disk insert into db then delete from file ...... or save it as a variable used a function to check if the variable Contain the file if yes the. directly insert it into db |
| Re: Java: How Can Write A File on Internet To A SQL Blob Field Directly? by Desyner(op): 3:13am On Oct 15, 2017 |
@ehinorlive, That's what I am avoiding. I want to stream the file from the internet via a URL object in to a db without saving it as a file in between. |
| Re: Java: How Can Write A File on Internet To A SQL Blob Field Directly? by Nobody: 3:36pm On Oct 17, 2017*. Modified: 3:55pm On Oct 17, 2017 |
Check stackoverflow |
| Re: Java: How Can Write A File on Internet To A SQL Blob Field Directly? by Desyner(op): 1:47am On Oct 19, 2017 |
proxy20:Not there. Seem a rare task and I plan to solve it as soon as I am less busy. |
| Re: Java: How Can Write A File on Internet To A SQL Blob Field Directly? by Nobody: 1:03pm On Oct 19, 2017 |
Desyner:Ok |
How Do You Write A Program That Delete Duplicate File On Your System • How Will I Check Locks In A SQL Server Database? • Interested In Teaching Yourself Programming? file on link • 2 • 3 • 4
Is It Adviceable To Learn Two Programming Languages At The Same Time • What Is The Best IDE For Programming Python And Django In 2019 • Do You Give Loans To Your Thrift Customers