112 questions
1
vote
2
answers
389
views
Laravel 11 + Backblaze B2 (S3-Compatible): PUT error — "Unsupported header 'x-amz-checksum-crc32'" when uploading files
I'm using Laravel's filesystem with the S3 driver to connect to Backblaze B2's S3-compatible API. Here's my disk configuration in config/filesystems.php:
'disks' => [
'b2' => [
'...
0
votes
0
answers
43
views
Images Not Displaying on Live Server (Shared Hosting)
Images stored in the public/storage directory are not displaying on the live server (shared hosting environment), but they work perfectly on localhost.
Relevant Code
Trainee.php Method
public function ...
1
vote
1
answer
103
views
Why is my file upload not saving to the database?
I am trying to create a post form where the user can upload an image and the image isn't being saved as well as the asset model isn't creating a new entry. I am using Livewire and Laravel's Filesystem....
1
vote
1
answer
159
views
Laravel Jobs: File created in job won't delete till queue has stopped
I am creating a temporary file in a Laravel Job which I want to delete later in the same job. However, the file does not seem to delete until the entire queue worker has been stopped. The file is ...
0
votes
1
answer
623
views
How to stream a video in Laravel
I'm trying to stream a video in Laravel 9 by using imanghafoori1/laravel-video package.
but I keep getting an error message:
fopen(C:...\storage\videoFiles/ui/2024-02-11-1-I6bnWsI8J0-128210 (Original)...
0
votes
1
answer
247
views
download generated zip with laravel
I´m trying dowload zip with my files in my app laravel. To build this logic, i´m using,ZipArchive and i including all my files in foreach. Zip it´s generated ok, and files it´s included. But browser ...
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 ...
1
vote
1
answer
703
views
How to implement mail using Laravel mail service in Laravel 9 or 10?
I want to implement Laravel mail service to send mail to user and attach file with that like dompdf package granted pdf.
I tried to implement a mail service to send mail in the controller and did it ...
1
vote
3
answers
2k
views
AWS AssumeRole with Laravel Filesystem
I'm currently trying to figure something out.
I have 2 AWS Accounts.
Account A has a bucket called my_awesome_files.
Account B has users, that would like to be able to see those documents in ...
0
votes
1
answer
48
views
Laravel error uploading image using $file->move()
My uploading function:
public function uploadImage($file, $path) {
$filename = Str::random(6) . '_' . time() . '_' . $file->getClientOriginalName();
$uploads_folder = public_path() . $path;
...
0
votes
0
answers
117
views
Disk [test-s3] does not have not have a configured drivers
Storage::disk('test-s3')->put($fileName, fopen($file_s3, 'rb')); throws error Disk [test-s3] does not have not have a configured drivers3s Below is the file system configuration 'disks' => [ '...
0
votes
0
answers
797
views
Laravel StoreAs Returns FALSE and does not upload the image
I'm working with Laravel v10, and I wanted to upload a picture into the directory public/frontend/images/home, so at the Controller, I tried this:
public function submitHomeBoxes(Request $request)
{
...
3
votes
3
answers
592
views
Laravel php delete a directory (folder) via sftp
I am trying to delete a folder on my server via sftp. I am using php 7.4.13 and laravel 7.30.4
I have set up my sftp drive and everything (upload, delete files, create directory) works fine.
But the ...
0
votes
1
answer
471
views
Laravel - storage_path function doubles path
I'm trying to get a path to a file in my storage folder. Although the storage_path() function duplicates the given path.
My code
$firstFile = 'app/public/temp/' . $timestamp . '/' . $tempName . '1.pdf'...
0
votes
1
answer
989
views
Laravel Nova : Avatar Fields using S3 disk but return 0 value
i try to upload avatar photo on my user model, using laravel nova Fields\Avatar applying the simpliest code, but it return 0 value on my database, the disk already set to s3 disk in filesystem also ...
0
votes
2
answers
96
views
Laravel: Uploaded image not showing
i keep getting 404 image not found when viewing the uploaded image on my project but the image is there. im using laravel's asset() helper to retrieve the image. the url in chrome shows http://127.0.0....
0
votes
2
answers
1k
views
Cannot move image/files temp to public directory Laravel 9
I am trying to upload an image in Laravel. Getting the following error:
"message": "Could not move the file \"C:\\xampp\\tmp\\php84AA.tmp\" to \"F:\\bvend\\bvend-web\\...
1
vote
1
answer
121
views
ZipArchive won't get all files
I am trying to create zip file from specific folder files, it does create the zip file but .env file (i guess any file that starts with dot) will not be include in zip files.
Question
How can I add ...
2
votes
1
answer
663
views
How to make filename of file uploaded with getClientOriginalName make safe?
In https://laravel.com/docs/9.x/filesystem#file-uploads I read as file custom file uploading :
However, keep in mind that the getClientOriginalName and getClientOriginalExtension methods are ...
2
votes
1
answer
1k
views
404 Not Found when access Laravel storage files in subfolder directly on browser
I'm using Laravel 9 with NGINX as the web server. I've running storage link command so I can access the storage files, but when I'm trying to access file which is placed inside subdirectory/subfolder ...
0
votes
0
answers
365
views
laravel returns error 403 when trying to access an image or file in a new directory that was created while uploading the file
laravel returns 403 forbidded when trying to access a file I uploaded to a new directory that was created while uploading the file
Please help what can I do?
2
votes
1
answer
1k
views
Laravel Dynamic Filesystem Configuration Set in Controller Level
I'm trying to set filesystem configuration value dynamically in controller level. (I think it's almost impossible).
For example:
'sftp' => [
'driver' => 'sftp',
'host' => ...
1
vote
2
answers
1k
views
Laravel creating cache files under different users and different permissions
The server sometimes encounter permission errors. When checked the cache directory the cache files are being written under different users and permissions. I guess the issue is causing because of that....
0
votes
1
answer
889
views
laravel storage embed pdf not found
I want to embed a PDF file into a modal blade view. The disk is not public (because it shouldn't be) and with a logged in user, I get the 404 not found message.
Inside config/filesystems.php I got:
&...
-2
votes
1
answer
1k
views
Image not uploading in laravel 8 didn't take hasFile [closed]
I am trying to upload an image and save it into a folder and database. But when I submit the form get all the data including the image file name but the image is not saved. In the database save as a ...
1
vote
1
answer
951
views
Laravel queues Call to a member function storeAs() on string
I am trying to store heavy image through the laravel queue as follows because i dont want my user to wait until file gets stored:
This code is in controller
if($request->hasfile('featuringPhoto'))...
2
votes
2
answers
2k
views
Can S3 Laravel Disk be pointed at a specific folder within a bucket
In Laravel filesystems you have the standard s3 details like below:
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID', 'your-key'),
'secret' => env('...
0
votes
1
answer
1k
views
Is there any way to clear out cache of S3 using Laravel?
I am using a JSON file from the s3 which is uploaded after certain changes are made in the system. Due to the cache, I'm not getting the updated JSON even though is it deleted before the new one gets ...
5
votes
1
answer
10k
views
League\\Flysystem\\AwsS3v3\\AwsS3Adapter::__construct(): Argument #1 ($client) must be of type Aws\\S3Client, Aws\\S3\\S3Client given
I have installed the s3 flysystem package by running the following composer command in my Laravel 8 project
composer require --with-all-dependencies league/flysystem-aws-s3-v3 "^1.0"
and ...
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
343
views
Laravel copyDirectory function not working
I wanna copy or move a directory to a new directory in laravel but the copyDirectory function always return false to me. Am I doing anything wrong with my code? Thanks in advance
$destinationDir = '...
2
votes
2
answers
6k
views
Download file from backend laravel using vue as frontend
I have created controller in Laravel which contains following code
$doc = Document::find($id);
if (Storage::disk('local')->exists($doc->path)) {
return Storage::disk('local')->get($doc-&...
0
votes
0
answers
46
views
laravel how to access uploaded image by store method with symlink
I'm trying to upload an image in laravel and I'm using store method to save it in storage.
$path = $request->file('avatar')->store('public/avatar');
It's working fine and save the file into ...
4
votes
1
answer
4k
views
How to get non image recently uploaded temp file name in Laravel Livewire
I am using Livewire to upload a non image file.
When uploading the file, Livewire automatically generates a long name for the temporary file and stores it in the default livewire-tmp directory.
I want ...
2
votes
0
answers
674
views
How to prevent the file from public on Digital Ocean Space?
Hi everyone I stuck on Digital Ocean that I want to prevent my file from the public.
First of all. I set the .env file like this
DO_SPACES_KEY= THE KEY
DO_SPACES_SECRET= THE SECRET
DO_SPACES_ENDPOINT=...
0
votes
0
answers
1k
views
How to prevent the file access from public in Laravel?
I still a newbie in Laravel. Please help me to solve my issue. I stuck on to prevent the file from the public. I trying to make the file access from public to private in Laravel 7.
I put all of the ...
0
votes
1
answer
2k
views
AWS S3 endpoint issue
This is a really strange one as it started throwing errors over night - it's been working fine up until yesterday - this morning it's been playing all day.
I'm using illuminate/filesystem in my ...
0
votes
1
answer
1k
views
Laravel file from storage not found
Filesystem settings
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',...
1
vote
3
answers
7k
views
Laravel 8.x PDF file validation is not working correctly
I am working on Laravel 8.x. My task is to validate .PDF file on server side. Everyting working fine but when I upload a valid PDF file it is not validating and returning with an error.
My source code ...
0
votes
0
answers
623
views
Laravel, file storage put php resource
I was reading Laravel documentation, and came across the following example which I didn't quite understand:
use Illuminate\Support\Facades\Storage;
Storage::put('file.jpg', $contents);
Storage::put('...
0
votes
2
answers
1k
views
axios sending null when uploading files to laravel api. Error Message: "Call to a member function store() on null"
I have a form with file upload. I am using vue, axios and laravel 7 at the moment.
My form is as given below:
<form v-on:submit.prevent="createTask" enctype="multipart/...
1
vote
1
answer
1k
views
How can I copy a folder to another folder with Laravel?
So as the title said, I'm struggling to copy a folder to another folder
I tried this but no results
Edit: I got this to work by fixing the $npath variable I was just giving the url without the folder'...
0
votes
1
answer
1k
views
File upload returns null in Laravel
I'm working on adding media uploads to my custom CMS. To do this, I have tried multiple forms of the same upload function. When I click upload, the error says 'image' is a required field even with a ...
1
vote
0
answers
267
views
relative height for thumbnails in Laravel File Manager/Unisharp
I'm using unisharp file manager and I have a problem:
my Image files are in different dimensions, some are square, some other are rectangular.
I want to save thumbnails with original dimensions but ...
1
vote
1
answer
753
views
Laravel AWS S3 Image Streaming view [closed]
How can I get AWS S3 image as streaming view?
Now I can see image as following url:
<img src="https://s3.us-east-1.amazonaws.com/my-bucket/image.png" />
I want to get like this:
<...
0
votes
5
answers
5k
views
Laravel image upload to database
This function is the function I use to store a new company:
public function store(Request $request)
{
$file = $request->file('logo');
$filename = 'company-logo-' . time() . '.' . $file-&...
1
vote
0
answers
1k
views
Laravel flysystem sftp upload slow
I need make upload to a remote server. I made a new disk in filesystems.php
And my upload code looks like this:
$path = 'storage1';
$fileName = Str::random().'.'. $request->file->...
0
votes
2
answers
3k
views
Disk [google-drive] does not have a configured driver
Hi i am trying to link google drive api to the laravel system for what i have used google drive api in laravel and configured the filesystem and env setting. But when executed it returns DISK not ...
1
vote
1
answer
9k
views
Disk [public] does not have a configured driver. in laravel image upload
I am trying to upload a file to a public folder which was working lately but now it is showing below error:
Disk [public] does not have a configured driver.
I tried checking for configured driver in ...
2
votes
1
answer
1k
views
How to return image in Laravel 6?
I have this code:
public function showImage($id) {
$item = File::find($id);
return response()->file($item->file_name_and_path);
}
$item->file_name_and_path contains the following:
...