April 18, 2020
Estimated Post Reading Time ~

Bulk file transfers with WebDAV

Bulk asset transfers to a JCR are sometimes tedious, especially when using AEM's Assets Manager or Site Admin. Adobe has tutorials on how to upload to the DAM and accessing AEM via WebDAV. This tutorial will make accessing AEM's JCR via WebDAV clear for current versions of Windows and OSX, and provide an alternate solution to the upload to the DAM article. WebDav stands for Web-based Distributed Authoring and Versioning. All tutorial examples will need an instance to connect to, for the examples below a local author server will be used (http://localhost:4502).

WebDAV on Windows (Windows 10)
Specific to Windows you may first need to open regedit (I did) and go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters. Then change "BasicAuthLevel" key to "2". This allows for SSL and non-SSL shares. A restart may be required after this change.

Open an Explorer window with Windows Key + e. Select 'This PC'. Then select 'Map network drive'.


Then enter 'http://localhost:4502' as the folder. Also check 'Connect using different credentials'.

Then enter your admin credentials.

Your JCR via WebDAV should be visible now as the mapped drive. You may now bulk upload your files as you would using any other file system. This is great for /content/dam multiple folder uploads.

WebDAV on OSX
OSX has a very similar process as Windows. Open a Finder with the elegant alt + cmd + <space> keystroke. Then cmd + k to bring up the Connect to Server Dialog. Enter 'http://localhost:4502' and click connect. Select 'Registered User' and enter your credentials. It will then map the drive.


WebDAV via cURL
A more terminal/command line based developer, might want to use cURL commands in Terminal or Cygwin. These commands will just scratch the surface of cURL interactions with AEM, and are in the context of DAM assets.

Read the DAM folder: curl -u admin:admin 'http://localhost:4502/content/dam'

Delete a DAM folder: curl -u admin:admin -X DELETE 'http://localhost:4502/content/dam/project'

Create a DAM folder: curl -u admin:admin -X MKCOL 'http://localhost:4502/content/dam/project'

Upload a DAM file: curl -u admin:admin -T '/path/on/local/file.ext' 'http://localhost:4502/content/dam/project/file.ext'


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.