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:
parent
7696616a44
commit
d8fd024f2a
@ -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);
|
||||||
|
@ -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=";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user