I have created a simple upload form which resizes, encode to jpg (with help of intervention) and uploads the image to the directory public/profilepics/user['id']/profile.jpg.
Next I created a simple function delete to delete the picture from above mentioned directory.
The upload form also show the current profile.jpg in the respective folder. But when I have successfully deleted the picture(I confirmed by looking into the public/profilepics directory in file browser), I still see the old picture. After uploading another image, again I see the old image only.
Do laravel have remembering capability or have internal cache(I am not talking about the cache service include in laravel This one) which should be cleared to see the new image.
Actually I was working on updating profile picture page and encountered this problem.
Leave the comment if any of the file is needed.
Related
I am working on a project in which I am facing a problem with Profile image. I am using Windows 10 as a system and XAMPP (apache, mariadb, php) as a development tool.
I have created one profile.php page which simply shows user info and options for updating user information. When I want to display profile image, it will find the image in directory path="../img/user/alvis.jpg" and load it.
If I delete the alvis.jpg image from the directory, and I load the profile.php page then it will still display the image without any error.
What is going on?
Browser probably has that image cached.
In profile page make a check if image still exists. If not, display some default thumbnail.
Instead of alvis.jpg, use something unique when creating, updating profile images. For example, timestamp.
You can try this in Incognito Browser. Actually the image might be cached which is making the browser to load from local than from the actual source.
Just to be sure, check the names and path once again - In your code and in folders.
I've been creating a website in the same way that I usually so, where I add an article + image using HTML & PHP. The difference is that when I upload the photo, even though it displays on the web page, my folder shows an Icon instead of the image (See Below):
As the photos show on the webpage I didn't think much of it, until I tried to upload the website, where I kept getting an FTP upload error on the images. Then when loading the website, I found that none of the images were there.
I'm not sure what the problem is, but when I tried to open one of the photos in Fireworks it says, "Could not open the file. File is locked".
Does anyone know what the probelm is? I'm using the same upload method used previously.
I am using a PHP based application called CiviCRM which allows us to upload images via the KCFinder image uploader. The server is a Windows 2012 RS with IIS 8. The image gets uploaded correctly and also shows in the preview. However, Once I click away from the preview the image appears broken on the page. Even going to the URL on the browser shows the image broken. I tried the same thing for PDFS and same issue. If I login to the server and check the pdf and image it shows that it is uploaded correctly and I can even click on it. I checked further and there seems to be a user group called ReportServer. I tried searching for this group but could not find it. If I change the permission of this group to write or anything else it fixes the issue. Does anyone have any ideas?inherited permissions
I have code that relies upon a certain file naming convention. When I stopped working locally and made a new database and setup online and went to upload the images for the posts. Wordpress adds a -1 or -2 to my images even though it is a fresh db and fresh wordpress install.
The naming conventions I have are like so..
cover_somename.jpg
cover_somename_bg.jpg
Why would it make my files like cover_somename_bg-1.jpg when there are NO DUPLICATES in the media library. How can I turn this renaming feature off/ rename the files myself.
When you upload image on local it will create move image to upload folder. And while you moving project to live you create new data base you have only remove the image name from the data base table.
But you image still remain on Upload folder under the month folder that you have added
When you upload the same file name on live server on same month then it will check for "if file already exist or not if already exist then it will rename new uploaded file as you get.
you create new data base so you old image wouldn't display on admin so you need to clear the folder under the upload folder then it work fine please try once.
Ah images aren't in the DB turns out they are in uploads folder and if the uploads folder has images but its a fresh install the media library will be empty but will act like it has those files and renaming will occur.
I have recently installed Magento and am using it for the first time. I am trying to uplaod an image to a folder as the new logo in the heading. When I upload the image using FTP the file uploads successfully but I can’t see it in the folder listing in a browser or on the website or if I visit the url for the image. I get a 404 page instead. Everything is getting cached I believe. I have turned off caching in the back end and cleaned out var/cache folder. This is a new one to me as I wouldn’t ahve thoughts ftp uploading an image would or could be cached? I can’t even change the header image on my website.
Im using the hellowired them as a starting point.
Cheers
Check the permissions on the Images and the directory it is in.
Can you verify that it is in the folder that you have uploaded it too?
Can you view it on server browsing the directories?
Finally check that you have type it correctly as Linux box's are CAPS sensitive, this could be why you can't see it also.
Looks like my host migrated my accounts to another server and I was actually updating the old hosting. Thanks for your help.