Quantcast
Channel: AEM – Adobe Experience Manager Podcast
Viewing all articles
Browse latest Browse all 172

Asset File Upload Prevention

$
0
0

By default, the fileupload component in the Touch UI allows for files to be “dragged and dropped” into it from the DAM and also to be chosen from the local file system using a popup dialog. This is all fine and dandy unless it is undesirable to allow the uploading of files from the local file system (which is a frequent request from our customers). Uploading from the local file system can often lead to broken, or missing assets, or at the very least unmanaged assets. We strongly do not recommend allowing authors to do this.

Although this (the disabling of local file uploads) can be achieved through some very unpleasant javascript or other possible but equally poor solutions, there exists a very simple and elegant solution to this problem. In order to disable the upload from local device feature add the following property to the fileupload field:
allowUpload=”{Boolean}false”
For example:

It should be noted that this solution works for AEM 6.2 and 6.3.

A better solution would be to change the way that the local file upload worked by actually forcing the user to specify what folder in the DAM the asset should be placed. That is easier said than done, unfortunately. We will work on that and update things here on the blog once we have time to get that working. If you have other ideas for how to accomplish this, then be sure to let us know by twitter (@axis41) or email (info@aempodcast.com).


Viewing all articles
Browse latest Browse all 172

Trending Articles