Fixed using wrong variable on getFileFromAPI