The process of uploading files to OSS cloud service using Flutter consists of the following steps:
final OSS client = OSS(
endpoint: 'your_endpoint',
credentials: Credential(
accessKey: 'your_accessKey',
secretKey: 'your_secretKey',
),
);
final ref = client.ref(bucketName, objectKey);
await ref.putObject(
filePath,
options: PutObjectOptions(headers: {key: value}),
);
await ref.putObject(
filePath,
options: PutObjectOptions(),
onProgress: (int progress, int uploadedBytes, int totalBytes) {
// Handle progress updates
},
);
final result = await ref.putObject(filePath);
await ref.putObject(filePath).catchError((error) {
// Handle error
});
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-08-25 11:00:00 +0000
Seen: 13 times
Last updated: Oct 09 '21
Can the time zone be configured to Europe/Berlin in Google Cloud Scheduler?
As a beginner in data analysis, how can I connect my cloud editor to cloud Dataproc for Hadoop?
What is the method to modify the data of a firestore document using a firebase cloud function?
How can I utilize the official SDK to acquire a file from Huawei cloud?
How can a whole collection be removed using Cloud Functions?
How can several occurrences of Spring Cloud Kafka Binder be utilized to write to a common file?
Can Salesforce Health Cloud and Salesforce Marketing Cloud be integrated with each other?
What is the method to distinguish between user and organization tokens in Terraform cloud?