gitana/alpaca

Unable to set uploaded images in postRender

britisharmy opened this issue · 0 comments

I have this object

{
	"files": [{
		"name": "713311.png",
		"size": false,
		"deleteUrl": "https://example.com/file_uploads/uploads/713311.png",
		"deleteType": "DELETE"
	}, {
		"name": "1008112.png",
		"size": false,
		"deleteUrl": "https://example.com/file_uploads/uploads/1008112.png",
		"deleteType": "DELETE"
	}, {
		"name": "1048333.png",
		"size": false,
		"deleteUrl": "https://example.com/file_uploads/uploads/1048333.png",
		"deleteType": "DELETE"
	}, {
		"name": "1768201.png",
		"size": false,
		"deleteUrl": "https://example.com/file_uploads/uploads/1768201.png",
		"deleteType": "DELETE"
	}],
	"name": "John Matrix",
	"age": 40,
	"images": "no images",
	"ice": "Mint",
	"condition": "Refurbished",
	"array_data": [{
		"flavor": "strawberry",
		"topping": "nuts"
	}, {
		"flavor": "chocolate",
		"topping": "raisin"
	}],
	"description_required": "Y",
	"printer_type": "Laser Jet",
	"description": "<p><strong>This is a very good description</strong></p>",
	"color": "Blue"
}

that i have posted from my form and saved it in my remote server. I then obtain the object using ajax and try and display the images

in postRender

"postRender": function() {
$.get("http://localhost:8000/data_routes/fetch_edit_data", function(response){
form.data = response;
    console.log('Mounted Lifecycle Method', response );
    console.log('After Edit Data Inserted', form.data );
	let remoteData = JSON.parse(response);
	console.log('Remote Data', typeof response );
	//Object.assign(form.data, remoteData);
	$('#form').alpaca().setValue(remoteData);
  });
  
}

Every other data is displayed but the images are not. I am using image upload functionality http://www.alpacajs.org/docs/fields/upload.html

Why are my images not being displayed?