File Uploads
Secure file uploads
Secure file uploads let customers attach artwork, logos, or photos on the product page. Files are stored privately and downloaded from the WooCommerce order screen.
What file uploads do
The File Upload field type lets shoppers attach one or more files to a product before adding it to the cart. Uploads are validated, stored outside the public media library, and linked to the order item after checkout.
- Available on all plans
- Configurable allowed file types and max size
- Private storage with signed admin download URLs
- Works with classic and block checkout
Set up a file upload field
- Go to Smart Add-Ons → Addon Groups and open (or create) a group.
- Click Add Field and choose File Upload.
- Set the Label (e.g. “Upload your artwork”).
- Configure Allowed file types, Max file size, and whether multiple files are allowed.
- Optionally mark the field as Required, or hide it with conditional logic until another option is selected.
- Assign the group to products or categories, then Save Group.
Field settings
| Setting | Description |
|---|---|
| Label | Visible field title on the product page. |
| Required | Customer must upload a file before add to cart. |
| Allowed file types | MIME types such as image/webp, image/png, image/jpeg, application/pdf. Prefer WebP for photos and product artwork when possible. |
| Max file size | Per-file size limit. Also limited by PHP upload_max_filesize / post_max_size. |
| Multiple files | Allow more than one file on the same field when enabled. |
| Pricing | Optional fixed or formula price for the upload option. |
| Conditional logic | Show the upload field only when another option is selected (e.g. “Custom print”). |
Storage & security
Uploaded files are stored in a private directory under wp-content/uploads/saue-uploads/. Direct public URLs are blocked. Admins download files through a signed endpoint from the order screen — not from the Media Library.
- Records are stored in
wp_saue_order_uploads(and related order item meta). - Upload requests use a short-lived session token via
POST /saue/v1/upload. - Admin download:
GET /saue/v1/orders/{order_id}/items/{item_id}/uploads/{field_id}/download. - Developers can filter allowed MIME types with
saue_upload_allowed_mime_types.
Download files from an order
- Open WooCommerce → Orders and edit the order.
- Find the line item that includes the file upload field.
- Use the Smart Add-Ons upload download link next to that field.
- The file downloads through a signed URL — no public Media Library entry is created.
Server requirements for uploads
- PHP
fileinfoextension (MIME validation) upload_max_filesizeandpost_max_sizelarger than your field max size- Writable
wp-content/uploads/directory
Troubleshooting
| Issue | Fix |
|---|---|
| Upload fails immediately | Raise PHP upload_max_filesize / post_max_size, or lower the field max size. |
| File type rejected | Add the MIME type in the field’s Allowed file types list. |
| No download link on order | Confirm the order completed with the upload field selected, and that your user can manage WooCommerce orders. |
| Upload works in classic theme but not blocks | Update WooCommerce to 8.0+, clear blocks cache, and re-activate Smart Add-Ons. |