Assets in Que
Overview
In the Que ecosystem, an Asset is the digital file—like an image, video, or document—that you want to sign or verify. Before Que can process a file, it needs to know where to find it. You provide this information using an Asset Reference, a simple object that points to the asset's location.
This system is designed for security and efficiency. Instead of sending large, multi-megabyte files in API requests, you provide a lightweight pointer, and Que's infrastructure handles the heavy lifting of fetching and processing the file in a memory-efficient way.
Asset Reference Methods
Que supports two primary ways to reference an asset. Your choice depends on where your asset is located and your application's architecture.
Presigned Uploads
The recommended method for client-side applications. Securely upload files directly to S3 without exposing credentials.
URL Inputs
Reference assets that are already publicly available via an HTTP/HTTPS URL. Useful for server-to-server workflows.
Best Practices for Handling Assets
- Provide Content-Type: When possible, explicitly state the asset's MIME type (e.g.,
image/jpeg
). While Que can often detect the type automatically, providing it explicitly is more reliable and efficient. - Respect Size Limits: Que is designed to handle large files, but there are configurable limits to prevent resource exhaustion. Be aware of the default limits and override them if you are processing exceptionally large assets.
- Handle Errors: If Que cannot access or process an asset from the reference you provide, the SDK will raise an error. Ensure your application handles these cases gracefully, such as a 404 Not Found for a broken URL. See Errors and Troubleshooting for more details.