File Uploading

Top  Previous  Next

File upload is a useful feature in any web application. It is simple to add this option to your web page using dbQwikSite.  Your visitors are then able to use the file upload facility to move files to your host.  A common use of file upload is in the Edit or Add Pages, is to manage image files such as product images.


To Add a File Upload Feature to Your Edit or Add Page:


1. In Edit or Add Page, Right Click on the Page Item or insert a new Page Item to contain the file upload control


2. Select Properties from the popup menu


3. The Input Properties window appears


4. In the Input Control Type section, set the type to Image/File Upload




File name on server:Tell dbQwikSite how to name the uploaded file once it reaches your server. Do NOT specify a file extension, this comes from the source file.  You can use combination of field values and literals.  You should make sure that the pattern you create will be unique, otherwise files will overwrite each other.  Here we use the field EmpNo, which is the record identifier plus some text to make the files names more readable.  For example if we are uploading a file call "Mr Rice.jpg"  and mr Rice's Employee number is 1007, then our uploaded file name would be: Employee_1007_Pic.jpg.
Server Save Folder:   Specify the folder name relative to your dbQwikSite pages, where you want to store the file on your server.
Maximum File Size:   You can specify the maximum size of the image file to be uploaded to the web server.
Optionally you can store the uploaded file name in a field of your table.  To do this:
Save: Check The "save" option to enable saving your file in a database field.
File Name or Path Name: Choose how much of the name to store, just the file name (eg Employee_1007_pic.jpg) or the path and the file (eg /image/Employee_1007_pic.jpg).
in (Field): Choose the field in your table that will store the file name





When you preview the Update Page, it will be as shown below:




You can browse through the files or folders on your computer, then select the file you want to upload to the server.