Visitor sending files to server - help!!!

Results 1 to 2 of 2

Thread: Visitor sending files to server - help!!!

  1. #1
    Joshua Calvert Guest

    Default Visitor sending files to server - help!!!

    Hi!<BR><BR>Could someone take me trough the steps required to get this working? I&#039;m using MM UltraDev 4.0 to develop and I do it localy on my machine using PWS as web server.<BR><BR>One of my pages is a "submit" page, holding a form (form1) with several text fields. The form posts data into an associated MS Access97 database and everything works perfectly well until I try to add this "file field" component! When I do, UltraDev modifies the form tag, inserting this:<BR><BR>ENCTYPE="multipart/form-data"<BR><BR>This seems to prevent the form from submitting the text data to the database. What happens is that when I press the submit button, the page just reloads with empty fields and nothing has been inserted into the database! If I go into the code editor and remove that modification to the form tag, it functions properly again, but the file field still won&#039;t submit anything.<BR><BR>I tried to put this file field in another form on the same page (form2) with it&#039;s own submit button, but it wont work either. As I understand it, the forms ACTION property must hold the path to where the file is supposed to be uploaded to. Should this be the local path "D:lahlahblah...", or should it be the site relative path "/blah/blahaha..."? When I try this, the only thing that happens when I press the submitt button is that Windows pops a window showing the content of the directory pointed to in the forms ACTION property. <BR><BR>Placing the file field in a separate form would also mean that when a visitor submits a new entry to the database. he/she would have to submit the information in two steps, first the text data (form1) and the the associated picture file (form2). Seems a bit awkward to me, but I&#039;m not able to figure out any other solution to the problem right now.<BR><BR>Please help me out if you&#039;ve got any ideas. Verbose explanations always help! :)<BR><BR><BR>regards,<BR><BR>Josh

  2. #2 Guest

    Default RE: Visitor sending files to server - help!!!

    You have got things a little confused. <BR><BR>Firstly the action property of the form does not point to the location where you uploading the file to, but it specifies the asp script which is to process the form that you are submitting.<BR><BR>The enctype property has to be set to multipart/form-data in order for uploading to work. The default mode is intended for straight text submissions, but you can also send text with the multipart setting. It is most common to use a COM component on the server to process the ulpoading of files, but it can be done via ASP alone.<BR><BR>To find out more about uploading, you should visit the ASPFAQ via the link at the top right of this page. Also go to and look up the article on "Pure ASP Uploads" or something like that.<BR><BR>Good luck

Posting Permissions

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