I am working on laravel 5.4. I have used laravel storage where I have uploded images. It works fine in local. But when I have created zip and uploaded it on server then the public/storage folder is damaged and converted into files. That's why images are not visible on website.
Then what I have do to resolve it. I have delete that files and created zip of storage folder and upload it on server. And unzip that folder then images are visible.
Now, I am facing the another issue. Images are not uploaded into the storage folder.
So how to prevent this issue?
I got solution for it. I have used putty to use terminal of server.
First I have deleted storage folder from the public directory. Secondly, I had open directory of project folder in terminal using putty. Then write command as below :
php artisan storage:link
Now, its working perfect. As well as it restore all the images.
Related
I'm moving my project from one system to another in which storage is not working properly. i need to refresh the link of storage but when itry php artisan storage:link it says already linked. But i need to refresh it what is should do ?
php artisan storage:link
The above command will create symbolic link in public/storage from storage/app/public
so when you move laravel project to new server then remove generated symbolic link folder from public/storage
Also, make sure to delete only the symbolic link folder not the original content also . Sometimes in Filezilla, it asks to choose the option to delete the original file also.
Another better option is not to move the symbolic link folder to a new server so you can create new symbolic link to storage folder
I have a laravel application running in a cpanel webhost. My app saves some images in this path "storage/app/custom", and the problem is, files disappear for no reason.
Anyone had the same problem?
in my project I store pdf file as blob in the public/uploads folder via the move() function
$pdf->move(public_path('uploads/pdfs/'), $name)
but after I deploy the project on the host the project structure changed so all the public folders is inside the public_html and the whole rest project folder project name is in a folder inside the public_html too with the name of the project, so the uploads folder where I store the pdf files is beside the project folder, so when I try to store a pdf it creates whole new folder public/uploads/pdfs in the project folder but I need it to store the pdfs outside the project folder in the uploads folder, can anyone help me?
you could use a custom disk Documentation
Or you can try to use 'path' instead 'public_path'.
If I start new Laravel project everything is working fine (laravel new project for example) but my cloned projects have 404 error
1.project cloned
2.env coppied
3.vendor composer install
4.key:generated
I can notice that vendor folder and .env file are gray color not white as other files.
In my created project all the folders and files are the same color
Thanks James.
Your answer opened my eyes.
I deleted the home route for some reason and I was trying to access that route all the time. It was not active.
When I tried another route it was all good.
It was working all the time ...
Thanks
I get the message "directory not writable" when trying to upload images into a normal cms page.
I have seen this before so I created a wysiwyg folder inside the media folder and chmod it to 777.
The images now upload but they dont appear in the wysiwyg folder on the backend. So I cant pick any images to inset into a page.
I tried copying the js folder from the original install folder, and it still doesn't work.
Any ideas?
Thanks
Check whether there is a folder named wysiwyg in media folder.
If no, then create /media/wysiwyg folder in magento installation folder and chmod 777.
If the problem still persists, then open the site in Firefox browser and activate firebug while opening the site.
Click on console and reload the page.
Now try to upload image. If there is some js error in console of browser, then download same version of magento you have, and replace the js folder from the download into your Magento installation and come back to minification later on.
Note: create a backup of your current js folder, just in case. Delete it once you have confirmed the fix works.