3 messages in com.mysql.lists.win32Re: Storing large files in a database...| From | Sent On | Attachments |
|---|---|---|
| Marshall Gatten | 20 Mar 2001 10:40 | |
| Stephen Woodbridge | 20 Mar 2001 11:20 | |
| René Tegel | 20 Mar 2001 11:26 |
| Subject: | Re: Storing large files in a database - code samples?![]() |
|---|---|
| From: | Stephen Woodbridge (wood...@mediaone.net) |
| Date: | 03/20/2001 11:20:42 AM |
| List: | com.mysql.lists.win32 |
Marshall ,
Just a thought, but if you are on a unix/linux box (see win solution below) you could keep all the files in a directory outside the server root and create a randomized symbolic link in the server path to the appropriate file. This would have little or no server impact and you cleanup routine would just remove the links.
Since this is a Win32 list, :) you probably need a solution that will work on Windows. I don't think short cuts would work the same way :(, but you could just copy the file from outside the server tree to a randomized name inside the server tree which I think would be faster than putting all the files into the MySQL server, it would also make maintenance much easier. This would also be easy to to with Perl. You might want to consider keeping a cache file so if you get multiple requests for the same file you use the existing one instead of copying another under another random name.
The cache list could be a MySQL table with a date/time of last request, the you script can scan the table looking for old requests and remove them from the table and the file system.
-Steve
Marshall Gatten wrote:
I'm writing a program to manage software downloads for customers. For security reasons, I need to ensure that the files are not available on the web server to any unauthenticated user. What I would like to do is store the files in the database and pull them out and copy them to a randomized URL upon request. Some of these files are likely to be quite large (as much as 70MB). I know that this will give a pretty bad perfromance hit, but performance on this particular application isn't much of an issue.
Am I likely to run into problems with file size limits?
I'm writing the interface in a Perl CGI script. Has anybody else done this who might be able to make code samples available to me?
Thanks, Marshall
--------------------------------------------------------------------- Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before posting. To request this thread, e-mail win3...@lists.mysql.com
To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail win3...@lists.mysql.com instead.




