Files
alfresco-ng2-components/docs/content-services/share.directive.md
Eugenio Romano 2761626f55 [ADF-ADF-2528] share directive (#3102)
* share file directive

* share link phase 2

* share dialog

* share dialog test

* more documentation

* add more meaningfully specification

* Add  description in the dialog
2018-03-20 22:32:56 +00:00

1.4 KiB

Added, Status
Added Status
v2.3.0 Active

Node Public file Share Directive

Create and manage public shared links for files

adf-share

This dialog will generate a link that will be formed as "baseShareUrl + sharedId". For example if you set the input parameter [baseShareUrl]="http://localhos:8080/myrouteForShareFile/", the directive will ask to the Content service to generate a sharedId for the file. This will end up with a url link like :

http://localhos:8080/myrouteForShareFile/NEW_GENERATED_SHAREID

After you will need to implement in your app a logic that throught the router get the NEW_GENERATED_SHAREID and pass it to the adf-viewer

<adf-viewer
    [sharedLinkId]="NEW_GENERATED_SHAREID"
    [allowGoBack]="false">
</adf-viewer>

Basic Usage

<adf-toolbar>
    <button mat-icon-button
            [baseShareUrl]="http://localhos:8080/myrouteForShareFile/"
            [adf-share]="documentList.selection[0]">
            <mat-icon>share</mat-icon>
    </button>
</adf-toolbar>

<adf-document-list #documentList ...>
 ...
</adf-document-list>

Properties

Name Type Default value Description
node MinimalNodeEntity Nodes to share.
baseShareUrl string baseShareUrl to add as prefix to the generated link