Closed (fixed)
Project:
Acquia DAM
Version:
1.1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Aug 2026 at 04:27 UTC
Updated:
2 Sep 2026 at 13:20 UTC
Jump to comment: Most recent
Create the acquia_dam.upload_service in the parent acquia_dam module that handles file uploads to Acquia DAM via its API. This service does not exist today and is a prerequisite for the queue-based migration worker.
src/Services/AcquiaDamUploadService.php (parent acquia_dam module)src/Services/AcquiaDamUploadServiceInterface.phpacquia_dam.services.yml (parent module)tests/src/Unit/Services/AcquiaDamUploadServiceTest.phptests/src/Kernel/Services/AcquiaDamUploadServiceTest.phpuploadFile(string $file_path, array $metadata): ?string — Uploads a local file to DAM, returns asset ID or null on failureuploadFromUri(string $uri, array $metadata): ?string — Uploads from a Drupal stream wrapper URI (e.g., public://images/photo.jpg)getUploadStatus(string $upload_id): array — Check status of an async uploadvalidateFile(string $file_path): bool — Pre-upload validation (file exists, size limits, allowed extensions)acquia_dam.client (existing HTTP client for DAM API) and file_system serviceuploadFile() logic:
file.mime_type.guesserasset_iduploadFromUri() — Resolve Drupal URI to real path via file_system->realpath(), delegate to uploadFile()validateFile() — Check file size against DAM limits, validate extension against allowed typeslogger.factory for all upload attempts (success + failure)DamUploadException — Base exceptionDamAuthenticationException — API auth/token errorsDamQuotaExceededException — Storage quota exceededDamFileValidationException — Invalid file type/sizeacquia_dam.clientacquia_dam.upload_service in parent module's services.ymlStart within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
rajeshreeputraComment #5
rajeshreeputraMR merged!