Referencing a file in Database Dir

Results 1 to 2 of 2

Thread: Referencing a file in Database Dir

  1. #1
    Join Date
    Dec 1969

    Default Referencing a file in Database Dir

    I&#039;m trying to reference a .jpg file that has been uploaded through a browser into my database directory. The database directory is the only one with write permissions but it resides outside the wwwroot directory. Here&#039;s my code:<BR><BR>Set fs = Server.CreateObject( "Scripting.FileSystemObject" )<BR>If fs.FileExists("\brink-premfs1siteslahblahmembernamedatabasealex.jpg" ) Then <BR>response.write("File Exists!")<BR>response.write("&#060;img src=&#039;\brink-premfs1siteslahblahmembernamedatabasealex.jpg&#03 9;&#062;")<BR>End If<BR>set fs=nothing<BR><BR><BR>This gives me "File Exists!" but with no picture.<BR><BR>Slightly unsure of the single/double quote syntax, I tried it outside of the asp ie:<BR><BR>%&#062;<BR>&#060;img src="\brink-premfs1siteslahblahmembernamedatabasealex.jpg"&#0 62;<BR>&#060;%<BR><BR>but still no picture. So I tried "../../database/alex.jpg" but still no picture. I&#039;ve downloaded the file through ftp and it does exist and isn&#039;t corrupt. <BR><BR>I have no idea what to try next. Please Please Please help.<BR><BR>Alex<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Referencing a file in Database Dir

    Put the file inside the wwwroot dir!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts