1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-07 16:06:08 +00:00

Changes from comments in PR#442, in oc-project

This commit is contained in:
masensio 2014-03-20 15:34:54 +01:00
parent 7696616a44
commit d8fd024f2a
2 changed files with 7 additions and 0 deletions

View File

@ -116,6 +116,10 @@ public class GetRemoteSharesForFileOperation extends RemoteOperation {
result = new RemoteOperationResult(ResultCode.OK); result = new RemoteOperationResult(ResultCode.OK);
ArrayList<Object> sharesObjects = new ArrayList<Object>(); ArrayList<Object> sharesObjects = new ArrayList<Object>();
for (OCShare share: mShares) { for (OCShare share: mShares) {
// Build the link
if (share.getToken().length() > 0) {
share.setShareLink(client.getBaseUri() + ShareUtils.SHARING_LINK_TOKEN + share.getToken());
}
sharesObjects.add(share); sharesObjects.add(share);
} }
result.setData(sharesObjects); result.setData(sharesObjects);

View File

@ -36,4 +36,7 @@ public class ShareUtils {
// OCS Route // OCS Route
public static final String SHARING_API_PATH ="/ocs/v1.php/apps/files_sharing/api/v1/shares"; public static final String SHARING_API_PATH ="/ocs/v1.php/apps/files_sharing/api/v1/shares";
// String to build the link with the token of a share: server address + "/public.php?service=files&t=" + token
public static final String SHARING_LINK_TOKEN = "/public.php?service=files&t=";
} }