Skip to content

Conversation

@harshchiki
Copy link

…hem with space

Changes

  • removed space from the regular expression of invalid characters for folder name
  • adapted and added automation tests

Description

Same as above.

Related Issue

#132

Motivation and Context

The motivation came from the AEM team in Adobe, who maintains AEM Desktop App. The app now supports automated uploads of folders from local file system to AEM. Using space in folder names is a common practice and present in macOS and windows OS, which the app is supported for and most users (creative designers) are on.

How Has This Been Tested?

I have relied on automation test cases.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Additional detail: Space was not an allowed character in folder names. Changed proposed in this PR now allow them.

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
    Existing documentation citing folder names now allowing space character will have to be updated to now being supported as is, instead of previously being replaced with "-"(hyphen)
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
    Summary of tests run on my local machine
# npm test

  Create Directy Result Tests
    ✔ test result with response
    ✔ test result without response
    ✔ test result with error

  DirectBinaryUploadOptionsTest
    ✔ test url slashes
    ✔ test getTargetFolderPath
    ✔ test with http options
    
Closing all file handles
      ✔ create version only test
      
Closing all file handles
      ✔ create version with label and comments
      
Closing all file handles
      ✔ replace test
      
Closing all file handles
      ✔ replace and create version test
      
Closing all file handles
      ✔ trailing slash
      
Closing all file handles
      ✔ file upload smoke
      ✔ test total upload size
      
Closing all file handles
      ✔ direct upload smoke test
Closing all file handles
      ✔ progress events

  Exports Tests
    ✔ test exports smoke test

  FileSystemUploadDirectory Tests
    ✔ test get remote path

  FileSystemUploadItemManager Tests
    ✔ test get directory
    ✔ test get asset
    ✔ test get root asset

  FileSystemUploadOptions Tests
    ✔ test accessors
    ✔ test from options
    ✔ test folder node name processor
    ✔ test asset node name processor
    ✔ test invalid replace character
    ✔ test folder names with spaces

  FileSystemUploadUtils Tests
    ✔ test clean folder name
    ✔ test clean asset name
    ✔ test folder names with spaces
    ✔ test asset names with spaces

Closing all file handles
      ✔ filesystem upload smoke test
      ✔ test directory already exists
      ✔ test directory not found
      ✔ test create target folder
      ✔ test create upload directories
Closing all file handles
      ✔ smoke test directory descendent upload (59ms)
      ✔ test upload empty directory
      
Closing all file handles
      ✔ test eventually consistent upload (1187ms)

  HttpUtilsTest
    ✔ test get http transfer options

  UploadFile Tests
    ✔ test get file URL
    ✔ test part headers

  UploadResult Tests
    ✔ test timer

  UtilsTest
    ✔ test trim right
    ✔ test trim left
    ✔ test join url path
    ✔ test trim content dam
    ✔ test walk directory with descendents
    ✔ test walk directory no descendents
    concurrentLoop tests
      ✔ test max concurrent (203ms)
      ✔ test max concurrent value (203ms)


  50 passing (2s)

@harshchiki harshchiki marked this pull request as ready for review August 4, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant