I am uploading an image to the files collection
I am uploading an image to the files collection
and after it is uploaded, I wish the page to refresh showing the uploaded image. I have the following js:
preconsole.log('data[0] = ',data[0]);
console.log('image filename = ',data[0].success.filename);
//set image on page
Apperyio('news_image').val(data[0].success.fileurl);
console.log('news_image = ',Apperyio('news_image').val());
//save filename to storage
Apperyio.storage.news.update("$['newsImageName']", data[0].success.filename); /pre
What i wish to know is The line:
codeApperyio('news_image').val(data[0].success.fileurl);/code
Is val the correct method for updating the image url and if so how can I refresh the page to show the changes?