146 questions
1
vote
1
answer
134
views
generated link to image returns 404 error when clicked
I try to upload an image using PostMan and the response returns a link to the image, but when I click on it, it shows "404 not found" even thought the image is saved in storage/app/public/...
0
votes
0
answers
81
views
Laravel file in storage/uploads/... returns 404 on live server, but works on localhost
I'm deploying a website using Laravel on a server using CWP (Control Web Panel). On localhost, I can access files in storage/uploads/... just fine.
https://example.com/storage/uploads/...
0
votes
1
answer
136
views
Laravel Storage facade - fake retrieving files from disk during tests
My application needs to retrieve periodically files from an sftp filesystem via console command.
Writing unit tests for this command I need to fake this filesystem during the retrieval of those files, ...
1
vote
1
answer
93
views
Old avatar not deleted when uploading a new one
I am using Laravel Breeze to handle profile updates, and I have added functionality to allow users to update their avatar. Everything works fine, but the issue is that when a user uploads a new avatar,...
0
votes
3
answers
124
views
Embed pdf from storage into view
I want to embed a pdf from storage into a view/iframe. The storage is private and I can't permanently store the files on public folder.
Is there any way to accomplish this? Now the users need to see ...
0
votes
1
answer
68
views
Laravel: Issues with Adding Multiple Images to an Existing Collection
I'm working with a Laravel application where I need to manage multiple image uploads for an existing project. I'm trying to update the image list by first deleting old images from storage, then adding ...
0
votes
0
answers
218
views
Why saving image with spatie/image I got error?
On Laravel 10 site using spatie/image I read file from storage path and making some modifications. I want to save it under other storage path, but I got error when try to save image under storage path
...
0
votes
0
answers
808
views
Why image uploaded with spatie-laravel-media-library-plugin not found under storage?
On laravel 10 / filamentphp 3 site I have added spatie-laravel-media-library-plugin and upoading file with comnponent :
SpatieMediaLibraryFileUpload::make('image')
->disk('local')
->...
0
votes
0
answers
369
views
Laravel access to files from another PC / Mapped Network Drive
Sorry i'm still new to this.
I would like to access/read files from another PC within the same network using Laravel. I can access the files over mapped network drive from my PC.
I have try to access ...
0
votes
2
answers
171
views
Test multi storage in laravel
I have a issue while trying to mock multi Storage in laravel test enviromnment.
Here is my my code:
public function sftp ( Sibling $sibling ) {
$file_paths = Storage::build($sibling->config)...
0
votes
2
answers
1k
views
Laravel Storage: Image Not Showing
I'm working with Laravel latest version and I want to show an image like this:
<img src="{{ asset('storage/'.$media->med_path) }}" alt="Thumbnail" style="width: 100px; ...
1
vote
0
answers
97
views
Laravel/lumen return audio for html audio player
In my Lumen app I'm getting audio file from external Lumen service and saving it in Storage.
$tempname = tempnam(sys_get_temp_dir(), 'response').'.mp3';
Http::sink($tempname)->get(...
1
vote
1
answer
526
views
Class \"League\\Flysystem\\UnableToWriteFile\" not found
We have a laravel application that has a command to move some files from one s3 bucket (different account) to another s3 bucket. This command runs once at day, and certainly every time it runs we get ...
1
vote
1
answer
682
views
Laravel Storage SFTP
I'm trying to upload file via Laravel filesystem abstraction on two different remote servers with:
Storage::disk('sftp')->put($fileName, $file);
Storage::disk('ftp')->put($fileName, $file);
The ...
0
votes
0
answers
38
views
Returning response with the image contents NOT WORKING
I want to load an image as avatar of user like this at the Blade:
<img src="{{ route('adm.profile.details.show.avatar') }}" alt="user-img" title="Avatar" class="...
-1
votes
1
answer
1k
views
Link pdf file in data table from storage folder-Laravel 10
I was able to successfully save the generated pdf file to the path storage/app/public/pdf. Now I want to open a link to each pdf file from a data table in a view. I keep getting a 404 error whenever I ...
0
votes
1
answer
69
views
Laravel storage - access denied (different owner)
I have two different points which I need to write to the same log file, one is a concole commando file and another is a web controller.
In both cases I use append command:
Storage::disk('local')->...
-2
votes
2
answers
1k
views
Copying To Clipboard Of a File PATH in Laravel 8 NOT WORKING
I have made a Media Library in Laravel 8 app which users can upload their pictures.
Here is the blade that retreives information of uploaded assets in a table:
<table class="table table-hover&...
-4
votes
1
answer
1k
views
laravel image not found in public/storage
I am trying to access images for my project.
I have run php artisan storage link
Laravel create public/storage
when I upload image to storage/app, I see the image in storage/app but not in public/...
0
votes
3
answers
724
views
Laravel 9: Can Not Read Images From Storage Directory
I have a Laravel 9 project and I just uploaded this project into server.
Now for this project everything works fine except the images that are coming from storage directory.
For example, I tried ...
0
votes
0
answers
2k
views
Laravel return false when upload file with S3 Endpoint (Custom domain)
I have working upload file feature with AWS,
This is my code for upload file
/**
* Create image and save it to storage.
*
* @param string $key
* @param string $relation
*...
0
votes
0
answers
256
views
Laravel Storage: Download get content always returns false
I am downloading a file from an FTP storage. Even though the file exists and has content, the $download->getContent() always returns false.
I want that method because I need to use it for put to ...
3
votes
2
answers
699
views
Sending files through Laravel HTTP is resulting in unrecognised files on the other end
I am having a strange issue when trying to attach images to a HTTP request in Laravel. I am using the following code to send a file to a 3rd party api, but the 3rd party is only receiving partial ...
0
votes
1
answer
1k
views
How i do store public key and private key in Laravel Storage app folder
In PHP , i would do this
<?php
//create new private and public key
$new_key_pair = openssl_pkey_new(array(
"private_key_bits" => 2048,
"private_key_type" => ...
0
votes
0
answers
736
views
How to download file mime_type:application/octet-stream using laravel 9
Using Storage
In older version of Laravel is working fine but Laravel9 is creating an issue
File Mime type: application/octet-stream
return Storage::download($shippingLabelPrn);
Laravel9 shows error
...
2
votes
3
answers
1k
views
Laravel 9: Can't write image data to path
I'm using Laravel 9 for making a forum project.
Now for this project, I need to upload some images.
So at the Controller, I added this:
if($request->has('filep')){
$files = $request->file('...
1
vote
1
answer
1k
views
How to get files using their modified date and time from Laravel amazon s3 bucket
We are using an amazon s3 bucket for storing files. There are very large number of files present, so we need to read files using date and time filter on which all the files have been created.
We are ...
1
vote
1
answer
134
views
Deleting a file from storage does not delete an image
I'm using Laravel 5.8 and I wanted to delete an image from storage directory.
Basically the images is placed at this dir:
/storage/app/public/laboratories/labs/21/pics
And I tried running this method:...
-1
votes
1
answer
1k
views
How to download file from FTP with Laravel Storage to the application itself?
I want to access my Storage, which is FTP (remote server) by default as it is in the config and I want to download a file from there to my application.
If I use Storage::download('path/to/file') I get ...
0
votes
0
answers
140
views
Laravel upload file in database and store it as well in public folder
Can someone help me while enrollment_form gets uploaded to the database? I also want it to be uploaded/stored in the /public folder.
public function submitForm(Request $request)
{
DB::table('...
0
votes
1
answer
573
views
Laravel Streamed Response From Azure (Multiple Files)
I've been working on this setup but I cannot save the downloaded streamed response to my zip file. I am using ZipArchive package and currently when I use return on the one with the yellow arrow. It ...
-2
votes
1
answer
142
views
How to upload,get and update an image or file in laravel ? What is the correct way?
What is the correct way to upload,update and get an image or file in laravel ? I had gone through laravel docs and other references but its confusing.Can anyone show a complete simple example for
any ...
0
votes
0
answers
56
views
Laravel storage::download(path_to_file) not working as required with .doc/.docx
I am trying to Storage::download(file_path) but with pdf file type it showing pdf file in postman, however with .doc/.docx it is returning some garbage value. I want to return doc file like pdf, below ...
1
vote
1
answer
2k
views
How to link storage path of domain to sub domain in laravel
I have two laravel project on shared hosting one admin panel and another website . main site is on /public_html directory and another on /portal directory .
-----(/home/onomy)
+portal
|-...
1
vote
1
answer
9k
views
How to retrieve file from Laravel storage subfolder?
I'm trying to retrieve a file from this path in a laravel project:
/storage/app/public/blog/3.jpg
These approaches produce following errors:
1.
$image = Storage::disk('public')->get('/storage/blog/...
1
vote
2
answers
3k
views
How to upload image to Laravel storage?
I'm trying to implement this guide on how to upload an image to the laravel storage but when I submit, it shows that the page is expired. There is not error report in the log which makes it difficult ...
3
votes
2
answers
13k
views
Laravel storage public url after storage:link not working
I'm trying to access the public images on my server via URL on the browser.
To do this, I have the following hierarchy in my storage folder:
storage
|app
|public
|post
|1
...
0
votes
2
answers
1k
views
Laravel storage link keep redirected to /public directory in hosting
I'm using a hosting service to upload my laravel project and link it to laravel's public directory using php header location in laravel's root directory. Then I created a storage link in public ...
1
vote
1
answer
12k
views
How to download file from storage app folder in Laravel 8
I want to download a file from Storage/app/public folder.
Somehow it doesn't work with out any error message.
Below is the code I've tried.
web.php
Route::get('/viewAllFile',[DownloadController::class,...
1
vote
0
answers
517
views
How to show DigitalOcean private Spaces temporaryURL on Laravel?
I have successfully generated a temporary link in laravel which works correctly locally but when I try to generate a link via Storage::temporaryUrl for the production environment, it does not work. ...
3
votes
2
answers
1k
views
Symbolic link from public/storage to storage/app/public still makes the files in the storage directory accessible from the web
What I have done
When I researched about storing files in laravel. I came across two approaches.
Storing the assets directly inside the public folder.
Creating a symbolic link from public/storage to
...
0
votes
2
answers
5k
views
How to upload file from my local storage into S3?
Looking at some samples how Laravel work with AWS S3 survice I see examples of code like :
$path = $request->file('image')->store('images', 's3');
But when I try to upload file from my local ...
0
votes
0
answers
269
views
How to rename folder on cloud disk in Laravel?
I use Laravel 8 with this code:
use Illuminate\Support\Facades\Storage;
// ...
Storage::disk('aws')->rename($old_path, $new_uri);
But it doesn't work.
I tried to do this too, but also not worked:...
0
votes
1
answer
237
views
Laravel storage issue with windows apache virtual host [closed]
I'm having issue with Laravel storage displaying image. i've enabled virtual host but when i click on the image url it goes to http://localhost/storage/. The same issue even with php artisan serve
...
0
votes
1
answer
582
views
Laravel Storage::download from Gmail url not working
In my Laravel 5.8 application I generate dynamically urls to download documents that are stored under storage directory.
I send the generated url via email, so user can click it in order to download ...
1
vote
1
answer
3k
views
How to get file as a resource with Storage?
I am trying to lock a file with the flock function but I am not able to do it. I work with Laravel 8 and Storage Class.
The code is as follows:
$disk = Storage::disk('communication');
$file_name = '...
4
votes
1
answer
3k
views
Programmatically get the driver name of a Laravel storage disk at runtime
I have a particular "disk" object obtained from the Laravel Storage facade, i.e. $disk = Storage::disk('some-name'). How do I get the name of the driver for that disk $disk?
In particular I ...
2
votes
1
answer
10k
views
Laravel get public url for file stored in storage public folder
On Windows I have Xampp. My application is in Anuglar and Laravel 8
I add files to folder public in storage folder.
Configuration in filesystem.php:
'public' => [
'driver' => 'local',...
0
votes
0
answers
246
views
Laravel storage, should I organize my files on database?
I have a web app where the user can upload files, create folders and stuff like that, I upload it on Google Cloud Storage, and organize it on a table files on my database, where I save the file name, ...
1
vote
1
answer
1k
views
How to create ZIP download in Lavarel from files stored on remote FTP server?
I need create ZIP file from folder in other host (subdomain) with FTP.
I need get download link from FTP.
$id = 1;
$zip = new ZipArchive;
$fileName = 'myNewFile.zip';
if ($zip->open(storage_path($...