File upload service: Does an overwrite if file is versionable by default.

File upload GUI: Displays the No flash text without destroying the layout
My site profile and collaboration site handles missing variables such as title and description
Create site: Its now possible to choose between public and private in the gui

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9982 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Erik Winlof
2008-07-23 07:09:44 +00:00
parent 8eaf3d9c1e
commit 2150e618d4

View File

@@ -8,7 +8,7 @@ var thumbnailName = null;
// Upload specific // Upload specific
var uploadDirectory = null; var uploadDirectory = null;
var title = ""; var title = "";
var overwrite = false; var overwrite = true; // If a filename clashes for a versionable file
// Update specific // Update specific
var updateNodeRef = null; var updateNodeRef = null;
@@ -154,7 +154,7 @@ else
if (existingFile !== null) if (existingFile !== null)
{ {
// File already exists, decide what to do // File already exists, decide what to do
if (overwrite) if (existingFile.hasAspect("cm:versionable") && overwrite)
{ {
// Upload component was configured to overwrite files if name clashes // Upload component was configured to overwrite files if name clashes
existingFile.properties.content.write(content); existingFile.properties.content.write(content);