Last post Feb 12, 2018 06:35 AM by XIII
Feb 10, 2018 11:14 PM|DevOnlineFranzN|LINK
I'm creating an Online Converting service. I have already all the Back-Ends [i mean], PDF Converter, Image or Video. Bt my question is how can I get the source of a file from SQL Database.
Once the user uploads his file, it is stored in my DB and after I need to have a certain source. I tried in localhost it works fine but online I don't know how to continue.
The problem is the file is stored in my DB as a binary data. How can I get the filename I mean something like: database/SQL_DB/video/upload/don't.mp4 to easily convert and save it to the DB again?
Thanks very much!
Feb 11, 2018 04:12 AM|KathyW|LINK
Can you clarify your question?
What worked in localhost that didn't work in your published site?
What do you mean "how can you get the filename"? Presumably you store that information also in the database, and associate it with the record where you are storing the source file. Can you describe the problem more completely?
Feb 11, 2018 07:20 PM|DevOnlineFranzN|LINK
Hello KathyW, I have the file stored in the database but my problem is how can I get the filename of a file in a Database? Thanks
Feb 11, 2018 08:38 PM|KathyW|LINK
I have no idea if you can. Why not store the filename separately when you upload it?
Feb 12, 2018 06:35 AM|XIII|LINK
there are several options:
1) store the name while inserting the file in the DB in a separate column for easy retrieval, depending on what you need the most you can also separate it further and store the extension separately as well.
2) don't store the file in the database but only the metadata while keeping the file on disk for easy access.