---
schema_version: "1"
id: f0dcbc2196855f93d61284201b8b45ce62ffc930e65914390f5f96243435485f
title: Salesforce Files
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexcode/apex_salesforce_files.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_salesforce_files.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 62555d802bd3904a73e4518ce8a73aad8f0d6fb8838d14fb21f9d07df51fe5c5
description: Use Apex to customize the behavior of Salesforce Files.
---
# Salesforce Files

Use Apex to customize the behavior of Salesforce Files.

- **[Customize File Downloads](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_salesforce_files_customize_downloads.htm)**  
    You can customize the behavior of files when users attempt to download them using an Apex callback. ContentVersion supports modified file behavior, such as antivirus scanning and information rights management (IRM), after the download operation. File download customization is available in API version 39.0 and later.
- **[Custom File Download Examples](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_salesforce_files_customize_downloads_examples.htm)**  
    You can use Apex to customize the behavior of files upon attempted download. These examples assume that only one file is being downloaded. File download customization is available in API version 39.0 and later.