PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Unsolved

media files : don't show "/storage/" in URL

nicolas-wi

Oct 4th, 2017 12:06 PM

Hey guys, i have a question,

URL : http://127.0.0.1:8000/storage/pages/page1.jpg

i want to have the URL: http://127.0.0.1:8000/pages/page1.jpg

can i change that ? Maybe you can me help.

mark

Oct 5th, 2017 05:43 AM

You will have to play around with the public storage disk.

https://github.com/laravel/laravel/blob/master/config/filesystems.php#L51

nicolas-wi

Oct 5th, 2017 06:15 AM

i have tried 'url' => env('APP_URL').'/storage', replaced by 'url' => env('APP_URL'),

dont work, than the files are not found. best,

mark

Oct 5th, 2017 06:28 AM

That is correct, since you will also need to change the location that the filesystem places the files. And then upload a new file to test if that is put correct.

Try this:


        'public' => [
            'driver' => 'local',
            'root' => base_path('public'),
            'url' => env('APP_URL'),
            'visibility' => 'public',
        ],

Note that you will need to copy any existing files or folders manually from the storage folder.

nicolas-wi

Oct 5th, 2017 06:37 AM

Oh of course, thank you very much. I want to try this.

in addition I would like the bread images uploads is not stored in folders by month/year.

Do you know what i mean ?

mark

Oct 5th, 2017 06:39 AM

Currently that is not supported, but its on my todo list.

nicolas-wi

Oct 5th, 2017 11:56 AM

can you tell me, how / or where i can change that manuely? I want to always that when i upload a file over the bread Controller, that the file is stored in no subfoler how October2017 ?

in "VoyagerController.php" row 34, i found it i think, ( $path = $slug.'/'.date('F').date('Y').'/'; ) i would like change it in ( $path = $slug.'/'; )