AEM Assets: Missing files and compressed filenames during folder uploads from Windows with long paths
This article explains why files are missing or have compressed filenames when uploading folders to Adobe Experience Manager (AEM) Assets from Windows systems with long file paths, and provides steps to resolve the issue.
Description description
Environment
- Adobe Experience Manager (AEM) Assets (all versions)
- Windows operating system (all versions)
Symptoms
- Some files are missing from the upload, but the upload completes without any notification or error.
- Uploading a folder containing only the affected files fails silently (no files uploaded, no error shown).
- Uploading files individually into a new folder may succeed, but filenames appear compressed or arbitrarily shortened (For example: using the Windows 8.3 short filename format, like
MARKET 1.PSD). - This behavior occurs when the full file path (including all directories and the filename) exceeds 260 characters on Windows systems.
- No error is displayed in the AEM UI, and the issue is consistent across different AEM environments.
Steps to reproduce
- Create files on macOS with long paths, then move them to a Windows system.
- Attempt to upload these folders or files to AEM Assets from Windows.
- See that some files are missing or have altered filenames after upload.
Cause
This issue is caused by the Windows operating system’s MAX_PATH limitation (260 characters). When file paths exceed this limit, Windows may omit files from browser uploads or provide them with shortened (8.3 format) filenames. AEM Assets receives only the files and filenames provided by the browser and can’t detect or correct omissions or filename changes introduced by the Windows OS.
Resolution resolution
Follow the steps below to resolve the issue:
- Move folders to a location closer to the drive root (For example:
C:\assets_to_upload\...) to reduce path length. - Shorten intermediate folder names where possible.
- Shorten filenames, if necessary, before uploading.
- Ensure the complete local path (drive, folders, filename, extension) is within the Windows 260-character path-length limitation.
- If assets originated on macOS, perform the upload from macOS or Linux to avoid Windows-specific path limitations.
- For large-scale migrations, consider using supported bulk import or upload API methods (such as AEM Assets Bulk Import or AEM Assets Upload APIs) to bypass local filesystem limitations.
After making these changes, verify that all files upload successfully and filenames are preserved, as expected.