in reply to Perl Cgi mysql document management

Quite understandable. :D

Catching an identifier and attaching it to a file name is part of the upload-file syntax. You do have to assume that your user uploads the proper file. Unless you use ActiveX or some such dangerous extension, your user does have to save the edited template and then upload it manually to a File Upload dialog on your web system.

That said, you can use Perl to grab either a stored cookie value or a login ID from a log in sequence and create a filename from one of those values.

Replies are listed 'Best First'.
Re^2: Perl Cgi mysql document management
by consiglieri (Initiate) on Mar 08, 2005 at 09:36 UTC
    Yes uploading via browser is doable..however if possible I would like to have the user use the wordprocessing program and when he/she saves the right name is chosen and the document is saved to the database..i'm assuming my users will be lazy and forget to do an upload via the webrowser (then again maybe i'm not doing my users justice :) ). Anyway, perhaps its not possible. The user would fist be accessing a website, then choosing a client_id and then click on a button and voila the wordprocessor starts and the document is allready named klient_id + and incremental number. Then when saving it goes back to the database. Ah well,, i will work on the webuppload to begin with. Thanks for the input guys, always helps to get the mind on the right track because sometimes i find that my train of thought hasnt left the station :)
      Your wish is unfortunately (or fortunately!) not possible, except perhaps within a Java wordprocessor / browser / sandbox environment or something on M$'s Real Soon Now wishlist for .NET. Your WP can't (yet!) save to the 'net, and your 'net system can't steal a file from your filesystem.

      The only other alternative I see is having a daemon or timed ("cron") service on the user's system that automatically checks for edited files and uploads them back to the 'net server.

      Much as we'd all like to see such capabilities, they are too easy to exploit. That's why I used the word "steal" above; I did so deliberately. M$ ActiveX comes to mind, and we all see horror stories of how crackers exploit what's left of it in Outlook and IE.
        If wishes where fishes then the ocean would be full of them..hey wait a minute..the Oceans are full of them!! I see your point, and i'm beginning to understand that it would be a problem allthough i thought that i could initiate a connection between the the two machine and use win32 module..However i did come to think that one could have a webform where one fills out fields and then generates a document via latex or perhaps an oopenoffice file...allthough i havent discovered any modules for it yet..but havent really searched that much. Always looking Thomas