Mission not updating File Master Task 1, Task 3 and Task 4

Mission: FILES MASTER
Task: Get a directory listing with API

fileMasterTask1() async {

Directory tempDir = await getTemporaryDirectory();

String tempPath = tempDir.path;

String filename = "$tempPath/superfast.html";

File file = await File(filename).writeAsString("<html><body>Hello mbaas!\nUploading files is easy!</body></html>");

Backendless.files.upload(file, "/mission", overwrite: true, onProgressUpdate: (progress) {

  print(progress);

}).then((response) {

  print("File has been uploaded. File URL is - " + response);

  file.delete();

}).catchError((e) {

  print(e.toString());

});

}

fileMasterTask3() async {

//Backendless.files.listing("/web", "*.html", true)

Backendless.files.listing("/web").then((response) {

  for (FileInfo fileInfo in response) {

    print("File url: ${fileInfo.url}");

    //print("File public url: ${fileInfo.publicUrl}");

    print("File createdOn: ${fileInfo.createdOn}");

    print("File name: ${fileInfo.name}");

    print("----------");

  }

});

}

fileMasterTask4() async {

Backendless.files.getFileCount("/web", "*.html", true, true).then((count) {

  print("File count: $count");

});

}

Please, describe your problem here.

Missions are not updating the status … my code is right and also behaving as expected.

Hi there,

I can not proceed further, as I’m stuck with these tasks … they are not reflecting back… could please look into this?

Thanks and regards, Prakash

Hi,

Could you please provide the program output for each program you run? Also, for the upload task, please attach a screenshot showing the file had been uploaded.

Regards,
Mark

Hi Mark,

I could not get it. What program output should I provide?

I have provided the code that I ran. May be you want to see the debug output?,
Here it is as below:

Task 1: output

I/flutter ( 4869): 100
I/flutter ( 4869): File has been uploaded. File URL is - https://backendlessappcontent.com/B85C31BC-BC5F-6836-FFEB-49A7BD57BE00/7CA22779-0E5B-4486-9ECA-07A11D8301F5/files/mission/superfast.html

Task 3: output
I/flutter ( 4869): File url: null
I/flutter ( 4869): File public url: https://backendlessappcontent.com/B85C31BC-BC5F-6836-FFEB-49A7BD57BE00/7CA22779-0E5B-4486-9ECA-07A11D8301F5/files/web/mission
I/flutter ( 4869): File createdOn: 1607711409191
I/flutter ( 4869): File name: mission
I/flutter ( 4869): ----------
I/flutter ( 4869): File url: null
I/flutter ( 4869): File public url: https://backendlessappcontent.com/B85C31BC-BC5F-6836-FFEB-49A7BD57BE00/7CA22779-0E5B-4486-9ECA-07A11D8301F5/files/web/mission+accomplished
I/flutter ( 4869): File createdOn: 1608834566453
I/flutter ( 4869): File name: mission accomplished

Task 4: output
I/flutter ( 4869): File count: 7

Please resolve the issues, so I can move further.
Thanks & regards, Prakash

Hello @Prakash_Indorkar, I’ve created an internal ticket BKNDLSS-23636 to investigate your problem, and we notify you when the issue will be resolved. Thank for your patience.

Regards, Dima

not sure if the team is still on break? no further action or solution?

Prakash,

The ticket is in the queue to be handled. I apologize it is taking longer than anticipated. Meanwhile, could you check if the API tracking is enabled in Backendless Console? You will find it on the Manage > App Settings screen.

Regards,
Mark

Hi @Prakash_Indorkar

Tasks are not completed because of a little spelling mistake.
Task 1:

upload a file into the mission directory

So you should call exactly

Backendless.files.upload(file, "mission")

not

Backendless.files.upload(file, "/mission")

Similarly for the task 3:
listing("web"), not listing("/web")

and task 4:
getFileCount("web") not getFileCount("/web")

Please follow instructions carefully.

Best Regards,
Maksym