Accesses app-generated data objects via URLs and file downloads.
NodeEntry|string, attachment?: boolean, ticket?: string): stringNodeEntry|string - Node or Node ID to get URL for.boolean - (Optional) Toggles whether to retrieve content as an attachment for downloadstring - (Optional) Custom ticket to use for authenticationstring - URL string or nullstring, attachment?: boolean, ticket?: string): stringstring - boolean - (Optional) Toggles whether to retrieve content as an attachment for downloadstring - (Optional) Custom ticket to use for authenticationstring - Node, allowableOperation: AllowableOperationsEnum|string): booleanNode - Node to check allowableOperationsAllowableOperationsEnum|string - Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissionsboolean - True if the user has the required permissions, false otherwiseNode, permission: PermissionsEnum|string, userId?: string): booleanNode - Node to check permissionsPermissionsEnum|string - Required permission typestring - (Optional) Optional current user id will be taken by defaultboolean - True if the user has the required permissions, false otherwiseUse the Content service to deliver data to the user from Blob objects.
The Blob class
(implemented in the browser, not ADF) represents an array of bytes that you can
use to construct and store data in any binary format you choose.
The user can access a Blob either by downloading the byte array as a file or in
some cases by viewing it directly in the browser via a special URL that references
the Blob. For example, you could use the Blob interface to construct an image in the
PNG format. Since
PNG is a format the browser can display, you could use the Blob's URL in an
<img> element to view the image within the page. Alternatively, you could let
the user download it as a PNG file.
The downloadBlob method starts a download of the Blob data to the filename
within the user's downloads folder. The other downloadXXX methods do the same
but first convert the supplied data to a Blob before downloading; see the
Blob reference page
for details of how a Blob's contents are assembled from the constructor arguments.
Use createdTrustedUrl to generate a URL string for a Blob. The URL refers to
the Blob as though it were a file but it is actually an object stored in memory,
so it does not persist across browser sessions. This URL can be used much like any
other, so you could use it for the src attribute of an <img> element or the
href of a download link. Note that while the URL is 'trusted', the data it contains
is not necessarily trustworthy unless you can vouch for it yourself; be careful that
the data doesn't expose your app to
Cross Site Scripting
attacks.
© 2023 Alfresco Software, Inc. All Rights Reserved.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.