diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index adde6d9..3804aaa 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -4,6 +4,9 @@
+
+ uses
+
diff --git a/src/main/java/org/gcube/portlets/user/shareupdates/server/ShareUpdateServiceImpl.java b/src/main/java/org/gcube/portlets/user/shareupdates/server/ShareUpdateServiceImpl.java
index cfdbebe..c9f72b8 100644
--- a/src/main/java/org/gcube/portlets/user/shareupdates/server/ShareUpdateServiceImpl.java
+++ b/src/main/java/org/gcube/portlets/user/shareupdates/server/ShareUpdateServiceImpl.java
@@ -124,7 +124,7 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar
}
public String getDevelopmentUser() {
String user = TEST_USER;
-// user = "costantino.perciante";
+ // user = "costantino.perciante";
return user;
}
/**
@@ -315,8 +315,7 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar
// Managing attachments: the first one will use the same fields of a link preview.
// If more than one attachments are present, they will be saved as Attachment objects.
- // In this way we can handle retro-compatibility.
-
+ // In this way we can handle backward-compatibility.
List attachments = null;
String firstAttachmentName = "",
@@ -363,10 +362,18 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar
// evaluate the date (this will be the date of the post)
Date feedDate = new Date();
- //this means the user has shared a file without text in it.
String textToPost = "";
+ //this means the user has shared a file without text in it.
+
+ _log.debug("Url vale " + firstAttachmentDownloadUrl);
if (escapedFeedText.trim().compareTo(ShareUpdateForm.NO_TEXT_FILE_SHARE) == 0) {
- textToPost = TextTransfromUtils.convertFileNameAnchorHTML(textToPost);
+ if(uploadedFiles.size() <= 1){
+ textToPost = TextTransfromUtils.convertFileNameAnchorHTML(firstAttachmentDownloadUrl);
+ }
+ else{
+ StringBuilder sb = new StringBuilder();
+ textToPost = sb.append("shared a set of files.").toString();
+ }
} else {
textToPost = escapedFeedText;
}