Hi again monks, I'm back with another Catalyst related doubt. Well, since my last post here I've learned Catalyst and recalled quite much about all the things I forgot about Perl (yippee!). The Catalyst app I'm working on now has a Login controller, a signup controller and even an upload controller and the best thing is, I coded them myself after understanding stuff from that Catalyst book.

The good thing is I'm stuck again. What my application does is, after logging in a user, asks them if they want to upload a file or view all files that are present on the server. I used Catalyst::Request::Upload plugin for letting the user upload a file. Now, when I list all the files, I want the user to be able to click on the name of the file and the browser should open the "Download File" dialogue box. I tried using Catalyst::Plugin::Static::Simple but I can't seem to figure it out. :/ :(.

Will any monk be kind enough to present me a step-by-step crash course on how to use C::P::S::S? Or a better question is, since I learn faster by examples, can any monk point me to a complete example that uses C::P::S::S? I did google about it, but it still is unclear.

PS: No, I'm not allowing the user to view ALL files on the server, just the files I put in the application_root/static/temp directory.

In reply to Catalyst Help once again by code-ninja

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.