Class OSSUtils
java.lang.Object
com.alibaba.dashscope.legacy_2x.utils.OSSUtils
Deprecated.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DashScopeResultget_upload_certificate(String model, String apiKey) Deprecated.static StringDeprecated.Upload file to OSS without certificate reuse.static UploadResultuploadWithCertificate(String model, String filePath, String apiKey, OSSUploadCertificate certificate) Deprecated.Upload file to OSS with optional certificate reuse.
-
Constructor Details
-
OSSUtils
public OSSUtils()Deprecated.
-
-
Method Details
-
upload
Deprecated.Upload file to OSS without certificate reuse.- Parameters:
model- Model namefilePath- Local file pathapiKey- API key- Returns:
- OSS URL
- Throws:
NoApiKeyException- If API key is missing
-
uploadWithCertificate
public static UploadResult uploadWithCertificate(String model, String filePath, String apiKey, OSSUploadCertificate certificate) throws NoApiKeyException Deprecated.Upload file to OSS with optional certificate reuse.- Parameters:
model- Model namefilePath- Local file pathapiKey- API keycertificate- Optional upload certificate for reuse- Returns:
- UploadResult containing OSS URL and certificate
- Throws:
NoApiKeyException- If API key is missing
-
get_upload_certificate
public static DashScopeResult get_upload_certificate(String model, String apiKey) throws NoApiKeyException Deprecated.- Throws:
NoApiKeyException
-