Closed Dragotic closed 9 years ago
For best results with load place the sentence just after the end of the php, like this -> ?><img src="../uploads/<?php echo $data['avatar']; ?>">
Then you have to make sure the path to the image is right. (for the script you give, the image is at [root of file showing the image]/uploads/image
)
Finally search inside of your database that the images names are stored with there extensions... like .jpg , .png , etc.
Unfortunately the first option didn't work. As for the other one, both the path and the extensions are correct. I just said that it doesn't refresh the avatar by itself, if i do refresh the page by myself the new picture is loaded.
You can try looking at the code first, and then compare it to when you upload a image, to look for errors or mistakes. If you don't know or be sure of this just post it here. :smile:
You could try on "success like this.
$(document).ready(function{
Dropzone.autoDiscover = false;
var myDropzone = new Dropzone("#avatar-dropzone");
myDropzone.on("success", function(file) {
$("#avatar").load("ajax/avatar.php?id=<?php echo
$opened['id']; ?>");
});
});
On Wed, Jul 8, 2015 at 8:35 PM, creptor notifications@github.com wrote:
You can try looking at the code first, and then compare it to when you upload a image, to look for errors or mistakes. If you don't know or be sure of this just post it here. [image: :smile:]
— Reply to this email directly or view it on GitHub https://github.com/thedigicraft/Atom.CMS/issues/139#issuecomment-119792403 .
I'm so stupid...if you look at the first function inside from users.php i forgot to put () after the function!
really stupid of me :/ Anyway, thank you guys :+1:
Ha nice catch! :P
On Thu, Jul 9, 2015 at 5:13 AM, Dragotic notifications@github.com wrote:
I'm so stupid...if you look at the first function inside from users.php i forgot to put () after the function!
really stupid of me :/ Anyway, thank you guys [image: :+1:]
— Reply to this email directly or view it on GitHub https://github.com/thedigicraft/Atom.CMS/issues/139#issuecomment-119914891 .
Hello guys,
lets go right into it! My avatar doesn;t refresh when a new one is uploaded. Here is the code:
From users.php
From avatar.php