duanpenpan5796 2018-03-25 08:13
浏览 94

Laravel Voyager存储链接问题

I have used custom directory structure to install laravel on xampp. public folder's content is in the htdocs/demos/sricargo/ folder

enter image description here

And rest of the files and folders are in same level of the htdocs and in this folder

enter image description here

I have managed to get laravel working with this folder structure. But after I installed voyager, In voyager dashboard it gives me this error

Missing storage symlink We could not find a storage symlink. This could cause problems with loading media files from the browser.

When I press the fix button it then gives this error

Could not create missing storage symlink We failed to generate the missing symlink for your application. It seems like your hosting provider does not support it.

This is the .htaccess file located in the htdocs/demos/sricargo/ folder

<IfModule mod_rewrite.c>
 <IfModule mod_negotiation.c>
    Options -MultiViews
  </IfModule>

  <IfModule mod_rewrite.c>
    RewriteEngine On
    Options +FollowSymLinks

    RedirectMatch ^/$ /wp-blog/
    Redirect "/demos/sricargo/blog" /wp-blog/

    RewriteBase /demos/sricargo/

    # Redirect Trailing Slashes...
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ /demos/sricargo/index.php [L]
</IfModule>

I even tried to created the symlink with php artisan storage:link command but it gives this error

The filename, directory name, or volume label syntax is incorrect. The [public/storage] directory has been linked.

When I create a new folder in media page and uploaded a new image file it's actually uploaded in this location sricargo_files\storage\app\public\

So the images thumbnail are not displaying in the media page and when i click public url link in media page it gives this url http://localhost/demos/sricargo/storage/app/public/bb/0U1TwmFxLcJ833ufKOSV4nrJlZs9QvZVb7yjEwq7.jpeg ('bb' is the newly created folder through media page). Even though this storage folder doesn't exist on this path htdocs/demos/sricargo/

How can this be resolved ? Any ideas ?

  • 写回答

1条回答 默认 最新

  • douzhanhui5662 2018-08-12 05:27
    关注

    you can set custom directory indeed, but the custom directory's location should be in your app directory for local development. If you make changes to your directory structure, php artisan command will not work

    评论

报告相同问题?

悬赏问题

  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法