public interface NosService
Modifier and Type | Method and Description |
---|---|
java.lang.String |
convertDownloadUrlToCDNUrl(java.lang.String url)
Convert a file URL to an acceleration URL over CDN.
|
AbortableFuture<java.lang.Void> |
download(java.lang.String url,
NosThumbParam thumb,
java.lang.String path)
Download files
|
AbortableFuture<java.lang.Void> |
downloadFileSecure(java.lang.String url,
java.lang.String path)
Download a file through a secure link
|
InvocationFuture<java.lang.String> |
getOriginUrlFromShortUrl(java.lang.String shortUrl)
Get the origin URL from a short URL for clients that have activated the security service for files stored on NOS.
|
InvocationFuture<java.lang.String> |
getOriginUrlFromShortUrl(java.lang.String roomId,
java.lang.String shortUrl)
Get the origin URL from a short URL for clients that have activated the security service for files stored on NOS.
|
AbortableFuture<java.lang.String> |
upload(java.io.File file,
java.lang.String mimeType)
Upload files using the default NOS scene
NimNosSceneKeyConstant#NIM_DEFAULT_PROFILE
For more information, see uploadAtScene(File, String, String) |
AbortableFuture<java.lang.String> |
uploadAtScene(java.io.File file,
java.lang.String mimeType,
java.lang.String sceneKey)
The same as
upload(File, String) with specified NOS scene. |
AbortableFuture<java.lang.String> |
uploadEnableForce(java.io.File file,
java.lang.String mimeType,
java.lang.String sceneKey,
boolean enableForceUploadFile)
The same as
upload(File, String) with specified NOS scene and the option whether to forcibly resume uploads. |
AbortableFuture<java.lang.String> upload(java.io.File file, java.lang.String mimeType)
NimNosSceneKeyConstant#NIM_DEFAULT_PROFILE
For more information, see uploadAtScene(File, String, String)
file
- filemimeType
- file typeAbortableFuture<java.lang.String> uploadAtScene(java.io.File file, java.lang.String mimeType, java.lang.String sceneKey)
upload(File, String)
with specified NOS scene.file
- filemimeType
- file typesceneKey
- The NOS sceneKey for uploads. Default value: NimNosSceneKeyConstant#NIM_DEFAULT_PROFILE
. For information about how to configure NOS token scene, seeNosTokenSceneConfig
.AbortableFuture<java.lang.String> uploadEnableForce(java.io.File file, java.lang.String mimeType, java.lang.String sceneKey, boolean enableForceUploadFile)
upload(File, String)
with specified NOS scene and the option whether to forcibly resume uploads.file
- filemimeType
- file typesceneKey
- The NOS sceneKey for uploads. Default value: NimNosSceneKeyConstant#NIM_DEFAULT_PROFILE
. For information about how to configure NOS token scene, seeNosTokenSceneConfig
.enableForceUploadFile
- The option to specify whether to forcibly resume uploads. The default value is false.AbortableFuture<java.lang.Void> download(java.lang.String url, NosThumbParam thumb, java.lang.String path)
url
- File URLthumb
- Thumbnail configurationpath
- Download locationAbortableFuture<java.lang.Void> downloadFileSecure(java.lang.String url, java.lang.String path)
url
- File URLpath
- Download locationjava.lang.String convertDownloadUrlToCDNUrl(java.lang.String url)
url
- The origin URLInvocationFuture<java.lang.String> getOriginUrlFromShortUrl(java.lang.String shortUrl)
shortUrl
- The short URL. If the parameter is not a long URL, 414 is returned.InvocationFuture<java.lang.String> getOriginUrlFromShortUrl(java.lang.String roomId, java.lang.String shortUrl)
roomId
- The ID of a chat roomshortUrl
- The short URL. If the parameter is not a long URL, 414 is returned.