I was not implying that users upload directly to the file system, I was thinking of something more like inserting some code into the stream just before the ImageSave() stored procedure, so the logic and flow of the app is essentially the same. Something like this:
<pseudocode>
public void SaveImage (OtherParms, img)
{
if (img.Size < 1000)
imgID = sp_SaveImage(OtherParms, NULL);
SaveToFileSystem(img, imgID)
else
sp_SaveImage(OtherParms, img);
}
public img LoadImage (imgID)
{
img = sp_LoadImage(imgID);
if (img = NULL)
img = LoadFromFileSytem(imgID);
}
</pseudocode>
I'm not sure how this will perform, probably not very good, but CPU time is cheap these days... I'm not a web guru, so I'm not 100% certain this approach would even work. Any thoughts?
By the way, as soon as I posted my previous message, I realized how silly it was to think I could do such a thing in the SP. The DB server is certainly not even the same machine as the web server, and the DBA probably wouldn't like us using his file system to persist our images, even if it was possible.
Jon