close ad
 
Important WebAssist Announcement
open ad
View Menu

Web development tutorial

Getting Started with Digital File Pro 2

Tutorial created by Ray Borduin, WebAssist

Categories: Data Bridge, Dreamweaver, PHP

rating

With Digital File Pro, you can add download or upload functionality to your site. This can be useful when selling digital goods, providing customers with the ability to upload files or images, or adding functionality to your administrative back-end.
This Getting Started Guide provides basic instructions for successfully implementing this tool on your site.

arrow downRequirements

You will need the following items before starting this tutorial:

  1. Dreamweaver CS3 or later
  2. Digital File Pro 2
  3. PHP page
  4. Database connection (required for counter in digital download section)

arrow downCreating a Digital File Upload

Digital File Pro’s Upload behavior is the most common use of the tool. Here you can specify upload restrictions, determine where the file is stored, and what file types can be uploaded.
Digital File Pro 2 allows you to specify multiple output options for your files.

Step 1: Create the File field

  1. With your dynamic page already open, choose the File field option from Forms category of the Insert bar.

  2. In the ID field enter upload.
  3. In the Label field enter Upload File.
    These are recommended IDs and Labels, feel free to specify something different.
  4. Click OK.
  5. If your cursor was not already within a form tag, you will be asked to create one. Click Yes in this case.
  6. Place your cursor below the File field to create a Submit button.
    You can create as many form fields as you like. Here we will just cover the single Upload field.

  7. Choose the Button option from the Forms category of the Insert bar.

  8. In the ID field, enter Submit.
  9. Leave the label field blank.
  10. Click OK.
  11. Press Ctrl (Cmd) + S to save your page.

Step 2: Creating the Upload behavior

  1. lFrom the Insert menu, choose WebAssist > Digital File Pro Upload.
  2. From the Trigger menu, choose Button: Submit pressed.
  3. From the File Field menu, choose the File field, upload, that we just created.
    Many of the options available in the wizard can be configured dynamically. Look for the lightning bolt if you wish to dynamically configure an option.

  4. If you wish to only allow images to be uploaded, choose the Web images only checkbox.
    This will enable a number of image resize options in Step 2 of the wizard.
  5. If Web images only is selected, choose a file format that you wish to convert all images. If you choose JPEG or PNG, set the desired level of quality or compression, respectively, from the adjacent list.
    If you do not wish to convert the image format, choose Keep existing format.
  6. From the Action menu, choose what you wish to be done to a file if a file with the same filename is already on the server.
  7. If a Rename option is selected in the Action menu, choose how you wish to rename the file.
    By default, the name will be appended with a number.

  8. Click Next to proceed to Step 2.

Step 3: Using the File Settings Window

The File settings window allows you to specify multiple output options for the file that is being uploaded. By default, only one file is saved.

  1. To add an additional file to be outputted, choose the Add (+) icon.
  2. Select the new file entry in the File Settings window, to specify settings for that file.
  3. In the Upload folder field, enter the relative path to the folder you wish the file to be uploaded to.
  4. In the File field, enter the filename you wish this file to have.
  5. If necessary, in the Default file field, enter a file to be used as placeholder for this image.

Step 4: Customizing Image options

The Image options settings will be available if Web images only was selected in Step 1 of the wizard.

  1. From the Resize menu, choose the resize option (if any) that you wish to apply to this image.
    By default, if you have selected to add a second item to the File Settings window, this option will automatically have been configured for a the creation of a thumbnail image. These settings are simply recommended for easy implementation, feel free to change them at any time. You can specify these default values by choosing Edit > WebAssist Preferences and selecting the Digital File Pro category.

  2. Specify a width and height for your settings.
    Depending on your selection from the Resize menu, these options may not be available.
  3. Choose a fill color from the Fill color menu.
    This option is only available when the Fixed width and height option is selected in the Resize menu.
  4. Click Finish to apply this behavior to your page.

Step 5: Add a progress bar

Digital File Pro 2.0 includes the ability to add a progress bar that will display while an upload is in progress. For instructions on adding a progress bar to your form, check out the Adding the Digital File Pro Progress Bar tutorial.

arrow downCreating a Digital Download

Digital File Pro provides the ability to add secure download features to your site as well. If you are selling digital goods, or want to restrict access to downloading certain files on your web site, this can be very useful.

There are a number of practical uses for this capability, and each varies based on your needs.

The following details the basic steps for applying the download server behavior to a button.

Step 1: Create the Download button

  1. Place your cursor on your dynamic page, where you want to add the download button.
  2. From the Forms category of the Insert bar, choose Button.

  3. In the ID field, enter download.
  4. Leave the Label field blank.
  5. Click OK.
  6. Click once to select your new button.
  7. In the Properties Inspector enter Download in the Value field.

Step 2: Create the Download behavior

  1. From the Insert menu, choose WebAssist > Digital File Pro > Download.
  2. From the Trigger menu, choose Button: download pressed.
  3. In the Folder field, specify the directory that stores the file that is to be downloaded.
  4. From the File name menu, enter the name of the file to be downloaded.
  5. In the Save as field, enter the file name you wish the downloaded file to have.
    With this feature, you can have a complicated file name that conforms to your file storage requirements, but can choose a friendlier file name for the customer who downloads the file.


    In the Download counter section, you can specify details for tracking how many times an individual file has been downloaded.
    You may find this useful for tracking purposes, but also if you have restrictions on how many times an individual can download a particular file.
    In order to use this feature, you must already have created a connection to a database that contains a column for storing the download count.

  6. From the Connection menu, choose the database connection you wish to use.
  7. From the Table menu, choose the database table to be used.
  8. From the Key column menu, select the key column for the table you selected.
  9. From the Key column value menu, choose the value in the key column that applies to the file that is being downloaded.
    In most cases, you first want to have a database table for your Items (or downloads) where there would be an entry for this particular item.
    This would also allow you to create more advanced dynamic options for your download.

  10. From the Count column menu, choose the database column you wish to use to store the count value.
  11. When you are ready, click OK.
  12. Press Ctrl (Cmd) + S to save your page.
  13. Press F12 to preview and test your download.
    Click the download button to download the file, and check your database to see if the download was recorded.

arrow downReviews and comments

Comments will be sent to the author of this tutorial and may not be answered immediately. For general help from WebAssist, please visit technical support.

Sign in to add comments
rating

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.