Mission Upload a file using API - can't advance to next task

I was able to successfully upload the necessary file to the “mission” folder using the Flutter SDK, but the task completion isn’t reflected. This is the same issue that another user encountered. Could you please mark this task as complete for me so that I can continue?

Here’s the snippet of code I used:

String filename = ‘/superfast.html’;
final path = (await getApplicationDocumentsDirectory()).path;
final file = await File(path + filename).writeAsString(‘Hello, world!’);
var result = await Backendless.files.upload(file, ‘/mission’);
file.delete();
print(‘file uploaded: $result’);

Here’s the result:
I/flutter ( 7679): file uploaded: https://backendlessappcontent.com/5E27A577-F75D-3802-FFFC-E96C7D66C300/ACFE7DDB-E0CE-4692-B70C-EC031DF1A669/files/mission/superfast.html

Thank you!
John

Hi @John_Rager,

Welcome to our community!

We are looking into your issue. Few minutes, please.

Regards,
Stanislaw

Hi @John_Rager,

could you please try to make the same request, but with a little difference? I’d like to ask to you remove a slash before the mission folder name. So that the following part of you code:
var result = await Backendless.files.upload(file, ‘/mission’);
becomes:
var result = await Backendless.files.upload(file, ‘mission’);

Also please remove the existing file before this.

And let me know please if the task is completed for you after that.

Thank you!

Regards,
Stanislaw

That did it Stanislaw - thank you! I’ll keep in mind to leave out the leading slash in the future.

Thank you,
John

Great news!

For our part, we will make sure in the next release that this will not interfere with the subsequent passage of missions in the future.

Thanks for reporting this issue and happy coding with Backendles!

Regards,
Stanislaw