ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Is it possible to allow a user to upload a file (let's say a text file for this example) and then store it in a table along with the user's other information?
If the answer is yes - can someone give me a hint as to how? I'm using PHP for the scripting language. But when I look at the storage types for PostgreSQL, there doesn't seem to be anything that would suggest storing a file in a table.
i dont know about PostgreSQL but mysql has the types {TINY|MEDIUM|LARGE}TEXT and BLOB, i would use TEXT for the text files and BLOB for binary files such as pictures.
ive just looked at the postgreSQL documentation and version 6.3(earliest manual on website) and above seems to have the text type available, are you sure the text type doesnt work? what happens if you run?
wouldnt work for a binary file but i think it would be perfect with a text file, your other choice is to store the uploaded file somewhere and store a path to it in the database.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.