#### Category : storage

Publiqué mi proyecto que funcionaba al 100% localmente. Esta alojado en DigitalOcean administrado con Laravel Forge y gitHub. Lo he configurado todo y hasta ahora el unico error es al subir imagenes. Me fijé y la carpeta para almacenar existe, tambien guarda el nombre del archivo y la ruta en la db pero no se ..

I am modifying an uploaded pdf with Fpdi, in laravel. The pdf is generated perfectly, I can see it in any file explorer. But laravel built in Storage::exists() returns false. It is a pretty weird error, because php file_exists method can find the file perfectly with the same path. I am completely out of ideas. ..

I’m faced a problem since yesterday in my laravel projet. I have a input file and the file is uploaded in the forder storage/app/public/uploads. Now when i want to show the file I have this message: "Access forbidden! You don’t have permission to access the requested directory. There is either no index document or the ..

There is a table house. It has four columns (where the path to the downloaded file should be saved). I tried to download one file in the controller for the test, but it did not appear in the database $this->validate($request, [ ‘passport’ => ‘required’ ]); $homes = Houses::query()->create([ ‘passport’ =>$request->get(‘passport’) ] ); $request->validate([ ‘file’ .. Read more I am using Huawei cloud for file uploading. I need multipart concurrent upload. Huawei gives its PHP multipart upload example, but can anyone show me a similar thing through Laravel Storage? As it would be much easy that way. Thank you Sourc.. Read more what is the best solution of storing product images? The project is developed on laravel framework and I am using laravel filesystem for working with files. My solution There is Offer model and Offer model may have multiple Upload model. Upload model have polymorphic relation with Offer model. only uploaded file path is stored in .. Read more I am using laravel 6.I linked my storage to the public folder by below command. php artisan storage:link I have Storage/public/users structure. Is there any way that my user folder will not link with the public folder. Thanks in advance. Sourc.. Read more I have a Laravel backend project and multiple ReactJS applications accessing to it through API calls. I have no problem with those because I configured config/cors.php to recieve requests to ‘api/‘ from any origin. Also tried to add ‘storage/‘ to paths, but it didn’t work: ‘paths’ => [‘api/*’, ‘storage/*’], ‘allowed_methods’ => [‘*’], ‘allowed_origins’ => [‘*’], .. Read more I’ve deployed a Laravel project for the first time on a shared hosting, I followed a tutorial that told me to put all files from the folder /public into /public_html and the rest of the project into a self created folder with your project name. I also configured the filepaths in the index.php and the .. Read more I’m writing tests for my application and struggling to understand whi Storage class is not building the expected file url. I’m having thist test that fails on asserting that expected url equals the builded one, so i put an if in my code and dd() stuff out to understand, and that’s the result: IF in .. Read more I have a problem with accessing shared network storage from my laravel app. It is mounted into /mnt/nfs/ folder inside my ubuntu server. I can access that folder/storage directly via terminal but when I try to use this folder as root folder for laravel storage. I receive this error: "impossible to create the root directory .. Read more I have a weird issue, I just setup a small Laravel project where the user can change it’s picture, I handled it like follows: if ($request->file(‘picture’)) { $file =$request->file(‘picture’); $file->storePubliclyAs(‘/user’,$file->getClientOriginalName(), [‘disk’ => ‘public’]); $user->picture = ‘/storage/user/’ .$file->getClientOriginalName(); } When I checked my database, I got the following in the ‘picture’ column: /storage/user/user.jpg ..

i completly recode my controller for get name, size of files stored in storage. But problem is how to download files. My code after click the button download file with name HTTP_1.0 200 OK. Whats wrong is with my code ? controller $filesDownload = [];$filesDownloadSize = []; $downloadLink = [];$filesDownloadPath = File::allFiles(storage_path(‘app/Files/’)); foreach($filesDownloadPath .. Read more I want to save uploaded file to ‘/home/user/images’ folder. Is there any way to do this? My 1st try: controller public function save(Request$request) { $file =$request->file(‘image’); $file_name =$file->getClientOriginalName(); $file_path = ‘/home/user/images’;$file->move($file_path,$file_name); } ///////////////////// My 2nd try: filesystems.php ‘disks’ => [ .. ‘custom_folder’ => [ ‘driver’ => ‘local’, ‘root’ => ‘/home/user/images’, ..

I’am using this code to display the image @foreach($Phones as$clothe) @if($clothe->category==’Phones’) <div class="card" style="width: 300px; display:inline-block; margin:20px;"> <img class="card-img-top" src="{{ URL::asset(‘storage/images/’.$clothe->image)}} " width="100%"/> the picture exist on storageapppublicimages but it doesn’t display on my page, btw i’ve made the php artisan storage:link Sourc..

Found a handful of questions on here about this with no answer, so hopefully, someone can point me in the right direction… I’m trying to create and save a csv file to storage, then update the DB in Laravel. I can create the file successfully, and I can update the DB successfully… but I’m stuck ..

I need to update my book database with new images from a external urls. The URL of the images are like mydomain.com/isbn/XXXXXXXXXXXXX.jpg and I have all ISBN’s I read all books and check if the image field is empty, my problem is to update the database and upload the file with a specific name like ..

I am currently have a feature which allows a user to click a button which opens up a PDF to view within the browser but the page keeps displaying a 404. Controller Code $path = ‘public/letters/letter-welcome-‘ . time() . ‘.pdf’; Storage::disk(‘local’)->put($path, $pdf);$url = Storage::url($path);$url = str_replace(‘/storage/’, ‘/public/’, $url); return redirect($url); When i look ..

I am trying to add logic that allows a user to upload an image which then saves and stores it within the database. The issue is when i upload the image the logo field stores the image as /tmp/phpXhmOZz or fefdndgdggpng when the correct storage should be storage/logos/fd66FT66t63F.png Controller if ($request->logo) {$logo = $request->logo->store(‘public/logos’); .. Read more i tried to create a user with email password … and image and multiple images, when I want to upload and store image and multiple images it is very slow, especially large images, what is the right way to solve this problem. protected function validator(array$data) { return Validator::make($data, [ ‘name’ => [‘bail’,’required’, ‘string’,’min:3′, ‘max:50′,’regex:/^[pLs-]+$/u’], ..

Thank you in advance, I have set up an app.yaml file too after deployment I got file_put_contents(/tmp/framework/sessions/r3SSHndYkTT0CZA2fUhBJ2i28qWj5qjNxdvZj4wB): failed to open stream: No such file or directory error while I have also created tmp folder and it’s subfolder as same as what is inside /storage folder with write permission, but still I am getting above error ..

I am new in using Livewire for my cart in my e-commerce Laravel 7 project. I want to show the product image of each item in the cart. I have @foreach ($cartItems as$item) on my table data wherein I have this code to try to show the images saved to my storage path: <img ..

here my code : Storage::disk(‘public’)->putFileAs(‘/img/uploads/specialties’, new File($validatedData[‘image_file’]); In local mode, when i upload an image, they are going into /public/storage/img/uploads/specialties but in production they are going to /storage/app/public/img/uploads/specialties What i tried :$ php artisan storage:link without success. Anyone know how to change where uploaded files going in production ? Thanks ! Sourc..