Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
API | Operation Description |
Get document preview URL | |
Get file download link | |
Get photo/video cover thumbnail link |
try {val previewAccessUrl: String = smh.getPreviewAccessUrl(//file pathfilePath = "filePath",//historical version numberhistoryId = 123456,//purpose (for marking the usage scenario of the link)purpose = Purpose.PREVIEW)} catch (e: Exception) {e.printStackTrace()}
try {val downloadAccessUrl: String = smh.getDownloadAccessUrl(//file pathfilePath = "filePath",//historical version numberhistoryId = 123456,//whether the file path has been url-encodedencode = true)} catch (e: Exception) {e.printStackTrace()}
try {val thumbnailUrl: String = smh.getThumbnailAccessUrl(//Filenamename = "name",//Directory namedir = Directory(),//historical version numberhistoryId = 123456,//generated preview image sizesize = 100,//proportional scaling percentage, this parameter is valid only when Size is not passedscale = 80,//scale width, this parameter is valid only when height is not passed and scaled proportionally, and when Size and Scale are not passed;widthSize = 100,//scale height, this parameter is valid only when width is not passed and scaled proportionally, and when Size and Scale are not passed;heightSize = 100,//purpose (for marking the usage scenario of the link)purpose = Purpose.PREVIEW)} catch (e: Exception) {e.printStackTrace()}
try {val thumbnailResult: ThumbnailResult = smh.getThumbnail(//Filenamename = "name",//Directory namedir = Directory(),//generated preview image sizesize = 100,//proportional scaling percentage, this parameter is valid only when Size is not passedscale = 80,//scale width, this parameter is valid only when height is not passed and scaled proportionally, and when Size and Scale are not passed;widthSize = 100,//scale height, this parameter is valid only when width is not passed and scaled proportionally, and when Size and Scale are not passed;heightSize = 100,//number of frames, frame processing targeting gifframeNumber = 6,//purpose (for marking the usage scenario of the link)purpose = Purpose.PREVIEW)val thumbnailUrl = thumbnailResult.location} catch (e: Exception) {e.printStackTrace()}
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários