Displaying image in Parse.com Javascript throws 403 (forbidden)

I have uploaded images in Parse cloud. I'm using rest API to return the image URL to Javascript client (in Google Chrome). The image fails to load. When Inspected, the console in Chrome shows

GET http://files.parsetfss.com/bd4945df-f61a-4e6d-99cc-9a026fbadfa3/tfss-870a44af-fc02-4271-b365-aaeb6074cc10-dominos.png/ 403 (Forbidden).

But when I open the URL in browser, the image appears.

I tried returning the file object instead of the URL alone but I get the same issue with fileObject.url(). Below is the code for reference

In Javascript

Object contains a property named icon which has the URL of the parse file

<img src=/>

In Cloud Code

Temp is returned

var temp = {};
temp.prop1 = "something"
temp.icon = parseObject.get('icon').url();


ANSWERS:


What if you replace this

<img src=/>

with this:

<img src="" />

?


The problem is with your URL. You have a trailing dash in the URL.



 MORE:


 ? Parse.com php sdk: Show image stored in Parse
 ? What is OBJECT_KEY in aws-sdk-php-laravel
 ? What is OBJECT_KEY in aws-sdk-php-laravel
 ? What is OBJECT_KEY in aws-sdk-php-laravel
 ? AWS SDK for Laravel giving PHP fatal error
 ? Not getting all result in parse using laravel 5.1 and php parse sdk with find() method
 ? Not getting all result in parse using laravel 5.1 and php parse sdk with find() method
 ? Not getting all result in parse using laravel 5.1 and php parse sdk with find() method
 ? Laravel 5.1 PHP
 ? laravel 5.1 notfoundhttpexception for all the requests except '/'