Heya peeps
kind of a noobDev here so please bear with me.
I'm working on a system where we have many files in various directories and sub directories that we want to make available to users as lists and links to download the files. (WAMP/Symfony mixture on the build, btw)
I have setup some tables in our DB and I was wondering a couple of things:
- How do I reference the files location on the drive from within the database? I am guessing that I should copy the physical location (i.e. C:\wamp\docs\marketing\peeps\ etc.) to a LONGTEXT or LONGVHARCHAR column, but I want to make sure I format it correctly
- There are many various document types and many different file sizes involved (ranging from around 100k to 200mb). What is the best way to set these as downloadable links? Do I have to include a column for mime_type and/or file_size? If so, what are the attributes for those columns and can those attributes be automatically pulled from the files themselves, or do I have to manually enter that data in the database?
- My idea is to have all the docs referenced in one table, with a foreign-key pointing to a media_category table which references the category (or path attributes i.e. c:\wamp\docs\marketing\peeps\old versions would be input as peeps, old versions into the media_category table. The Marketing tag would come from a separate foreign-key referencing the dept_name table).Is this the most efficient way to do this, or am I prepping overKill?
- If I do enter all of the paths manually into the 'location' column, do I need to input %20's for spaces in the DIR names, or will that be parsed correctly through the front end?
Any other thoughts on setting this type of system up would be greatly appreciated as well. Thanks so much for your time!