What is an Asset Directory?
  • 12 Mar 2024
  • 6 Minutes to read
  • Dark
    Light
  • PDF

What is an Asset Directory?

  • Dark
    Light
  • PDF

Article Summary

ProGet provides a robust infrastructure for hosting and distributing your application and component packages, and often it can be useful to distribute assets associated with those packages (such as certificate files, third-party installers, license key files, and so on) in ProGet as well.

You could package these files, but they are not versioned by nature, do not require additional metadata, and packing and unpacking them would cause additional and unnecessary steps. Sometimes a file is just a file, and ProGet asset directories provide the versatility of a file share with the added benefit of security and stability features such as scoped privileges, retention policies, automatic failover, and feed replication. Setting up an asset directory in ProGet and migrating from a network share is straightforward.

Example: An installer can be used by a configuration script to set up a workstation. The installer is already a self-contained package, so further packaging would be unnecessary; it just needs to be downloaded and run. It could simply be stored in an asset directory and referenced by URL.

Asset Directory

An asset directory is like a feed, except that it contains arbitrary files instead of package files. You can access these files through your web browser and the RESTful API.

Internally, asset directories are represented as feeds, which means:

Note: Connectors are not currently supported for asset directories, but may be added in a future release. Please contact us if you are interested in these additions.

To create an asset directory, go to Assets > Create Asset Directory.

Files in an Asset Directory

Asset Directories are made up of files and sub-folders that you can access through your web browser and the RESTful API. You can view file information, caching, metadata, and download information by clicking on a file in ProGet Web UI. Files can also be accessed as if they were hosted on a web server by navigating to the file's URL (see asset directory API). This URL is also displayed on the file information page in the Web UI.

Adding Files

Files can be added to an asset directory in a number of ways. You can:

Add/Upload Files

These options can be found by clicking on the Add/Upload Files button in the upper right corner.

  • Upload files; upload a single file or multiple files through your browser.
  • Upload via API: Use the asset directory API to upload one or more files to the asset directory.
  • Import from a zip file: Upload a .zip or .tgz file using your browser and expand its contents into the asset directory.
  • Import from Amazon AWS; download files stored in the cloud to this asset directory (Requires ProGet v6.0+ and the Amazon AWS Extension).
  • Import from Azure; Download files stored in the cloud to this asset directory (Requires ProGet v6.0+ and the Azure Extension).

Read how to use ProGet as a User-Interface for Amazon S3 and Azure Blog Storage in our step-by-step guides.

Import from a Drop Path

Starting with ProGet 6.0, you can configure an asset directory to use a "drop path", which is a local or network path that ProGet periodically scans for files. If this directory contains a file, it is imported into this asset directory.

To configure the Drop Path:

  1. Navigate to the asset directory
  2. Click Manage Directory in the multi-button in the upper right corner
  3. Select the Storage & Retention tab
  4. Click configure to the right of Drop Path
  5. Enter the local or network path to be monitored

Note: If you are using a network path, you must configure read, write, and delete access for the account under which the ProGet Windows service is running.

Deleting Files

You can delete a file in the asset directory by clicking the "X" on the file listings page, the "Delete File" button on the file overview page, or by using the asset directory API.

Media Types

When you upload a file to an asset directory, ProGet attempts to determine the file's media type. The media type is sent as a content-type response header when the file is downloaded, which may be used by the downloading application or script. For example, if the content-type is application/msword, then a web browser may open Microsoft Word to display the file.

You can change the file's media type by:

  1. Navigate to the file in the web UI
  2. Click set to the right of Type
  3. Enter the content type you would like to return

You can also set the content-type by using the asset directory API.

Sub-folders

Similar to a file system, you can use sub-folders to organize the files in an asset directory. Sub-folders may also contain other sub-folders.

You can view or edit sub-folder properties by clicking the pencil to the right of the sub-folder in the list, or by navigating to the folder and clicking the Folder Properties button in the multi-button in the upper right corner.

Adding Sub-folders

You can add a sub-folder by navigating to that asset directory or a sub-folder, and then clicking Create Sub-folder" in the multiple button in the upper-right corner, or by using the Asset Directory API.

Deleting Sub-folders

You can delete a sub-folder by clicking the "X" on the file lists page, clicking the "Delete Folder" button on the folder properties page, or using the Asset Directory API.

Custom Metadata

Custom metadata is available as of ProGet v6.0.*

Additional metadata can be stored in ProGet for files and sub-folders. Examples of metadata can include creator information, internal notes, build information, release information, and more. Files can also contain the metadata record as an HTTP header included in the HTTP download response.

File Metadata

You can add metadata to files by:

  1. Navigating to the file
  2. Clicking Add under the Additional Metadata section
  3. Entering the name and value of the metadata record
  4. Optionally, you can select Include as HTTP response header to send that record as an HTTP header value

Metadata can also be managed using the Asset Directory Metadata API.

Sub-folder Metadata

You can add metadata to a sub-folder by:

  1. Navigating to the folder's properties
    1. Clicking the pencil to the right of the sub-folder in the list
    2. Navigating to the folder and clicking the Folder Properties button in the multi-button in the upper right corner
  2. Clicking Add under the Additional Metadata section
  3. Entering the name and value of the metadata record

Metadata can also be managed using the Asset Directory Metadata API.

Client-side Caching

Client-side Caching is available starting in ProGet v6.0.

ProGet can instruct a user's browser or client tool to cache asset files in their local storage, reducing the number of requests to your ProGet server. Custom client-side caching can be set at the file or sub-folder level, which then returns the correct cache headers with the HTTP download request. When a cache value is set for a sub-folder, all files and sub-folders contained in that folder inherit that cache setting by default. You can override this setting for any child file or sub-folder. For example, you can set a folder to cache files for 30 minutes, but override a specific file in that folder so that it is not cached at all, while the remaining files use the inherited 30-minute cache setting.

To configure caching:

  1. Navigate to a sub-folder's properties or to a file in the Web UI.
  2. Click set to the right of Cache Header
  3. Select and configure the cache type:
    1. (inherited); inherit the cache header from its parent sub-folder
    2. Do Not Cache; do not cache the file in its local cace
    3. Browser Cache TTL; cache the file for a specific amount of time in its local cache
      1. Short (30 minutes)
      2. Medium (2 weeks)
      3. Long (1 year)
      4. Custom; duration in seconds
    4. Custom Cache-Control Header; specify a custom Cache-Control header to be returned in with the download request
  4. Click Save

Client-side cache settings are client-side only, they will not enable/disable any server-side caching.


Was this article helpful?