14.3 Uploading Multiple Files Simultaneously

Oracle Portal offers a couple of ways to upload multiple files simultaneously:

  • You can upload a Zip file as the Content Item Type File, and make it available to users for downloading multiple files at one time.

  • You can upload a Zip file as the Content Item Type Zip File, and unzip it within your portal for a fast upload of many files. If you wish, you can include their directory structure and, in the case of HTML, preserve their relative links and images.

This section explains how to make use of Zip files in your portal. It includes the following subsections:

14.3.1 Preparing Zip Files for Upload

You can upload a Zip file as a File item type or a Zip File item type.

When you upload a Zip file as a File item type, users can click the file link to initiate a download to their local systems.

When you add a Zip file as a Zip File, you can upload compressed files from your computer to pages in Oracle Portal. Users with the appropriate security privileges can upload compressed files of virtually any size or quantity.

Each extracted file in the Zip file is displayed in the page area as an item link. By creating descriptive file names before zipping files to be uploaded, you can provide meaningful link names to guide users to the file.

Uploaded files are accessible through automatically created links in the page area:

  • If you do not include path information in your Zip file, links for the uploaded pages display in a single page that you specify.

    To upload files without path information, when you create the Zip file, clear the Include sub-pages and Save Extra Page Info check boxes in the WinZip application.

  • If you include path information in your Zip file, links for each level are displayed in a common page for each level.

    To upload path information, when you create the Zip file select Include sub-pages and Save Extra Page Info. The relative locations of your files when you zip them are the relative locations they have when uploaded.

  • If you are uploading an HTML file with a title, the text between the <TITLE></TITLE> tags becomes the item's display name link text.

You can associate categories and perspectives with any bulk upload file. Once associated, both categories and perspectives are retained by bulk upload files, even if those files are overwritten with newer files of the same name. However, categories and perspectives are not maintained if item version control is enabled and when the Create New Version option is selected for bulk upload files.

14.3.2 Adding a Zip File as a File

When you add a Zip file as a File item type, it displays without the Unzip link and can be downloaded to your local system. This is useful when you want to make a set of files available for download to other users.

To add a Zip file as a file:

  1. Log in to Oracle Portal.

  2. Go to the page on which to add a Zip file.

    For information on locating a page through the Page Groups portlet, see Section 8.1, "Locating Pages in Oracle Portal".

  3. Click the Edit link at the top of the page.

    This opens the page in Edit mode.

  4. Click the Add Item icon in the region in which to add the Zip file (Figure 14-16).

    Figure 14-16 The Add Item Icon

    Add Item icon

    Note:

    If the Add Item icon does not display next to the region, the region may be a portlet region. In this case, you cannot add items to this region.

  5. On the Item Type Selection page choose File from the Content Item Type list.

    Note:

    If you do not see File in the list, the page group that owns the page may not allow files to be uploaded, or your administrator may not have selected this item type to display here. Contact your page group administrator for more information. If you are the administrator or have administrative privileges, you can click the configure the list of available item types link on this page and configure the page group to include the File item type.

    If the page group administrator has configured the page group to allow only one type of item, Item Type Selection page is skipped, and the Item Attributes page is displayed. For example, if the page group is configured to include only file-type items, when a user clicks the Add Item icon, the Item Attributes page for file-type items displays.

  6. Click Next.

  7. On the Item Attributes page, in the File Name field, click the Browse button to locate and select the file.

  8. In the Display Name field, enter the item's link text.

    This is what users click to view the item.

  9. Click Finish to upload the Zip file as a file and return to the page.

14.3.3 Adding a Zip File as a Zip File

When you upload a Zip file as a Zip File type item, it displays with an Unzip link you can click to upload the files to your portal. If directories are preserved through a setting in the WinZip application, they become sub-pages under the page on which you add the Zip file.

To add a Zip file that you will unzip within Portal for bulk page creation and file uploading:

  1. Log in to Oracle Portal.

  2. Go to the page on which add a Zip file.

    For information on locating a page through the Page Groups portlet, see Section 8.1, "Locating Pages in Oracle Portal".

  3. Click the Edit link at the top of the page.

    This opens the page in Edit mode.

  4. Click the Add Item icon in the region in which to add the Zip file (Figure 14-17).

    Figure 14-17 The Add Item Icon

    Add Item icon

    Note:

    If the Add Item icon does not display next to the region, the region may be a portlet region. In this case, you cannot add items to this region.

  5. On the Item Type Selection page choose Zip File from the Content Item Type list.

    Note:

    If you do not see Zip File in the list, the page group that owns the page may not allow Zip files to be uploaded, or your administrator may not have selected this item type to display here. Contact your page group administrator for more information. If you are the administrator or have administrative privileges, you can click the configure the list of available item types link on this page and configure the page group to include the Zip File item type.

    If the page group administrator has configured the page group to allow only one type of item, Item Type Selection page is skipped, and the Item Attributes page is displayed. For example, if the page group is configured to include only file-type items, when a user clicks the Add Item icon, the Item Attributes page for file-type items displays.

  6. Click Next.

  7. On the Item Attributes page, in the File Name field, click the Browse button to locate and select the file.

  8. In the Display Name field, enter the item's link text.

    This is what users click to view the item.

  9. Click Finish to upload the Zip file and return to the page.

Item attributes such as Author, Description, Image, New Item Indicator, and so on are available on the Add <Item> page only if the item was configured to include them. For more information, see Chapter 5, "Preparing to Add Content".

14.3.4 Extracting a Zip File Within Oracle Portal

Oracle Portal maintains any directory structure that is included with a Zip file. If the Zip file contains directories, Oracle Portal creates sub-pages during the extraction process, matching each directory with a sub-page. Oracle Portal creates the sub-pages under the page on which the Zip file is being unzipped. The files in a directory are placed on the directory's related portal sub-page.

To extract the content of a Zip file to a page:

  1. Log in to Oracle Portal.

  2. Add the Zip file to the page as described in Section 14.3.3.

  3. Click the Unzip link next to the Zip file.

  4. Click the Browse icon next to the Target Page field, and select a page, or a tab on a page, on which to add the Zip file's content.

  5. (Optional) Select Run Unzip In Background to run the extraction process in the background.

    When you clear this check box, you remain on this page until the content of the Zip file had been extracted to the target page. When you select this check box, this page does not display and you can perform other tasks.

    Note:

    If the Run Unzip in Background option does not function properly, your system administrator may need to set JOB_QUEUE_PROCESSES in the init.ora file to a value greater than one.

  6. In the Item Type section, select the type of items to create for the different types of files in the Zip file.

    Note:

    If items with the same name already exist, and you plan to choose Overwrite Existing Files or Create New Version in Step 7, the item type of the extracted files will be the same as the existing files, rather than the item type specified here.

    For example, you can specify that all of the images in your Zip file will be extracted as File items instead of Image items.

    1. For document files, such as *.doc, *.pdf, or *.htm, select an item type from the File list.

      When the process is complete, an item of the type you selected is added to the target page for each document file.

      Note:

      The list of item types may include File, Simple File, Zip File, and custom item types based on File item types.

    2. For image files, such as *.gif and *.jpg, select an item type from the Image list.

      When the process is complete, an item of the type you selected is added to the target page for each image file.

      Note:

      The list of item types may include Image, Simple Image, Simple Image Map, File, Simple File, Zip File, and custom item types based on Image item types.

    3. If your Zip file contains other archive files that do not end with a *.zip extension, such as *.jar files, select an item type from the Zip File list.

      When the process is complete, an item of the type you selected is added to the target page for each Zip file.

      If your Zip file contains other Zip files that do end with a *.zip extension, you do not need to select an item type here. Zip File items will be created automatically for each of the files.

      Note:

      The list of item types may include File, Simple File, Zip File, and custom item types based on Zip File item types.

  7. In the Overwrite Or Rename Files? section, choose whether to overwrite or rename existing files of the same name on the target page.

    If item versioning is enabled at the page level on the target page, the Create New Version option displays. Choose this to create a new version of any existing files that have the same name as those files being extracted into the target page.

  8. Click Unzip to begin the file extraction process.

    This process may take several minutes depending on the number and size of the files. Do not extract another Zip file while the extraction process is underway.

    If you selected Run Unzip In Background, you are returned to the page. If you did not select this option, you remain on the Bulk Load page.

  9. After the extraction process is complete, read the Bulk Load Log for information on the pages and items created.

    If you selected Run Unzip In Background, you can access the Bulk Load Log after the extraction process is complete by clicking the Unzip link next to the Zip file.

Only Zip files that are added as Zip File item types display the Unzip link. You cannot extract files from Zip files that are added as File or Simple File item types.