Functions return value but array length are returning 0

Try rewriting this so that:

  • every parameter and return type of each function has a declared type (not any);
  • the keyword new does not appear;
  • you never modify any external state (which disqualifies what you are doing with this.fileFids) - no writing to any properties of this;
  • the first word of any function returning a future (Promise or Observable) must be return

These rules may seem arbitrary, but I have found them relentlessly effective in stripping away bugs of the type you seem to have here.