Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Video Files Path

by Anonymous Monk
on Dec 21, 2006 at 13:35 UTC ( [id://591095]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Video Files Path
by themage (Friar) on Dec 21, 2006 at 13:51 UTC
    Hi,

    Just a note: MySQL don't have a real Blob field intented to store binary files (the MySQL blob is a Binary Version of the Text field type). You're sugested to store the media files in disk and keep the path to your file in the mysql record.

    TheMage
    Talking Web
      Yes, I could store all media files in a directory somewhere, and store only the path to the file in the mysql DB.
      Would that be efficient?
        Hi,

        Usually it would. If you have everything correctly configured and coded, most times you would just use the media files directly from the directory where they are stored.

        It really depends on what you're doing and how you're doing it.

        TheMage
        Talking Web
Re: Video Files Path
by marto (Cardinal) on Dec 21, 2006 at 13:41 UTC
Re: Video Files Path
by leocharre (Priest) on Dec 21, 2006 at 17:10 UTC

    I made a module that.. essentially is the base for an 'indexer'. It's beta but quite functional. Has tests etc.. I call it Metadata::ByInode , you inherit it and then you can overrite the method index_extra() - it gets passed a hash with the current file's path info (absolute path, filename )- you can use that to _set() whatever you want- like inspect the file's mime and feed it back to the indexer. I'll put it on cpan and post a link. It has examples and is fully documented.

    Metadata::ByInode

Re: Video Files Path
by MonkE (Hermit) on Dec 21, 2006 at 17:29 UTC
    Depending on how many videos you plan on having, you may want to consider storing an MD5 value (Digest::MD5) for each video in order to detect duplicates.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://591095]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-03-29 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found