Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I am trying to upload files in my flutter application using dospace and I have been getting this error message : flutter: DOException { statusCode: 403, reasonPhrase: “Forbidden”, responseBody: “<?xml version=“1.0” encoding=“UTF-8”?><Error><Code>InvalidAccessKeyId</Code><RequestId>tx0000000000000245603d7-0063457665-5c963c72-fra1b</RequestId><HostId>5c963c72-fra1b-fra1-zg02</HostId></Error>” }
Future<void> uploadFileMethod() async {
dospace.Spaces spaces = dospace.Spaces(
//change with your project's region
region: "fra1",
//change with your project's accessKey
accessKey: "*************",
//change with your project's secretKey
secretKey: "*****************************",
endpointUrl: 'https://fra1.digitaloceanspaces.com',
);
try {
var pickedFile;
FilePickerResult? result = await FilePicker.platform.pickFiles();
if (result != null) {
File file = File(result.files.single.path as String);
pickedFile = file;
} else {
// User canceled the picker
return;
}
String projectName = "*******"; // change to projectname
// change with your project's region
String region = "fra1";
// change with your project's folder
String folderName = "videofiles";
String fileName = pickedFile.path.split('/').last;
String? etag = await spaces.bucket(projectName).uploadFile(
"$folderName/$fileName",
pickedFile,
"image/jpg",
dospace.Permissions.public,
);
print(etag);
await spaces.close();
} catch (error) {
print(error);
}
}
Wojciech Warwas
Asored
Asored
Asored
Moustafa Alsayeh
ippei52
lousaint
ohohabbydale
dhameliyamilan972