Alpha Video Training
Results 1 to 1 of 1

Thread: Uploading files to the WAS, jpg or pdf only?

  1. #1
    Member
    Real Name
    David Priest
    Join Date
    Mar 2000
    Posts
    213

    Default Uploading files to the WAS, jpg or pdf only?

    I am uploading files to the WAS using code based on the example code given in the help file shown below and it works fine. When I click on browse, the Dialog Box allows me to enter "All Files"
    How can I restrict the file selection to only one type? ie jpg or pdf

    HTML Code:
    <html> 
    <%a5 
    dim msg as c = "" 
    if eval_valid("cmd") 
        file.from_blob(ServerSetting.Document_Root + "\\" + FileToUpload.filename, FileToUpload.data)
        msg = "<a href=\"/" + FileToUpload.filename + "\" target=\"_blank\">" + FileToUpload.filename + "</a> was uploaded<br /><br />" 
    end if 
    %> 
    <head>
    <title>File Upload example</title>
    </head> 
    <body bgcolor="#ffffff"> 
    <%a5 ? msg %> 
    <form action="<%a5 ? request.script_name %>" method="POST" enctype="multipart/form-data"> 
    <input type="file" name="FileToUpload" value=""><br /> 
    <input type="submit" name="cmd" value="Upload File"> 
    </form> 
    </body> 
    </html>
    All help appreciated, thanks

    David Priest
    Last edited by AaronBBrown; 07-31-2006 at 09:11 AM.

Similar Threads

  1. Uploading large files
    By Michael Crume in forum Web Application Server v7
    Replies: 2
    Last Post: 06-27-2006, 12:46 PM
  2. Uploading files
    By John Costello in forum Alpha Five Version 5
    Replies: 10
    Last Post: 06-21-2005, 05:45 AM
  3. Reference Image files other than JPG and BMP?
    By Howard G. Cornett in forum Alpha Five Version 5
    Replies: 2
    Last Post: 07-12-2004, 06:16 PM

Bookmarks

Posting Permissions

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