Greetings All:

Pardon the asp tags.  I use frontpage extensions for Linux; Win2K client in a
VMWare session.  It's easier for testing what Windoze users see.  My client,
and, all...

The FORM:
<FORM METHOD="POST" action="http://<%=$SERVER_NAME%>/index.html"
enctype="multipart/form-data">
...
<input type="file" name="ResumeDoc" value="<%=$ResumeDoc%>">
...
</FORM>

ACTION executes the following PHP script:
$qry = "INSERT INTO Resumes
        SET rid = '',
        email = '$email',
        FirstName = '$FirstName',
        LastName = '$LastName',
        URL = '$URL',
        resume = '$ResumeDoc',
        resumehtml = ''";
$link = mysql_connect($host,$luser,$pw);
$rs=mysql_db_query($db,$qry,$link);

which gets the following result:

105040 Query      INSERT INTO Resumes
                                SET rid = '',
                                email = '[EMAIL PROTECTED]',
                                FirstName = '',
                                LastName = '',
                                URL = '',
                                resume = '/tmp/phpcPu0bL',
                                resumehtml = ''
105040 Quit

The Problem:
Apparently, the upload works, and, sends the data to /tmp/phpcPu0bL, but this
isn't what I want.  I'd like to stream it directly into a variable and insert
that variable into the resume field.

I don't want to write to the file system, at all.  Anyone out there inserted a
binary file into a field (not LOAD DATA INFILE) from an INPUT type=file
submission on a form without touching the file system?

I've checked CGI.pm and that writes to the filesystem, also, so I'm not
considering it.

BTW, I do get the report back from the filesize function:
The size of the file was 20480 bytes...

But, I could easily count the size of the variable I pulled into the stream to
report back doc sizes over the 64Kbyte BLOB limit.  Or, SELECT LENGTH(resume).
BTW the resumehtml is for a subsequent update using a
wvWare -x /usr/local/share/wv/wvHtml.xml $ResumeDoc
call to make it searchable and delete the WordDoc from my server.  {In case you
were curious}.

Thanks if anyone's got something that flows from client to MySQL db without ever
hitting disk (of course MySQL uses the disk, but, I'm cool with that).
Certainly, someone's done this before.

Regards,
Van

=========================================================================
Linux rocks!!!   http://www.dedserius.com
=========================================================================




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to