Erm, that just strikes me as a bad idea. It's the same reason you don't use a "product number" or similar external identifier as a primary key: it's subject to change outside the database that's just begging to get out of sync. What happens if you move to a different machine (or even just a different filesystem on the same box)? What happens if the drive crashes and things get reloaded from a backup? You've just set yourself up to write more code to deal with these contingencies (which means more development time, more testing (and are you really sure you've covered all the cases?)).

Just seems like you're being overly clever to "save" yourself or your DB from doing a trivial bit of work. If you want something tied to the file itself an MD5 or the like would be a better choice than the inum.


In reply to Re: letting a browser client select a file to download by inode by Fletch
in thread letting a browser client select a file to download by inode by leocharre

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.