TestConnection tests S3 connection
(ctx context.Context, userID string)
| 332 | |
| 333 | // TestConnection tests S3 connection |
| 334 | func (m *S3Manager) TestConnection(ctx context.Context, userID string) error { |
| 335 | client, config, ok := m.GetClient(userID) |
| 336 | if !ok { |
| 337 | return fmt.Errorf("S3 client not initialized for user %s", userID) |
| 338 | } |
| 339 | |
| 340 | // Try to list objects with max 1 result |
| 341 | input := &s3.ListObjectsV2Input{ |
| 342 | Bucket: aws.String(config.Bucket), |
| 343 | MaxKeys: aws.Int32(1), |
| 344 | } |
| 345 | |
| 346 | _, err := client.ListObjectsV2(ctx, input) |
| 347 | return err |
| 348 | } |
| 349 | |
| 350 | // ProcessMediaForS3 handles the complete media upload process |
| 351 | func (m *S3Manager) ProcessMediaForS3(ctx context.Context, userID, contactJID, messageID string, |
no test coverage detected