【问题标题】:Laravel Vapor and Lavavel Excel queued imports failing. due to temp storage not existing Laravel 8 VaporLaravel Vapor 和 Lavavel Excel 排队导入失败。由于临时存储不存在 Laravel 8 Vapor
【发布时间】:2021-05-01 14:29:48
【问题描述】:

当我尝试运行实现块读取和队列的导入时,我从蒸汽队列收到以下错误;

ErrorException: touch(): Unable to create file /tmp/storage/framework/laravel-excel/laravel-excel-7IEEz0rP7NORtp7N4NeOxuH0hlbM9JPR.csv because No such file or directory in /var/task/vendor/maatwebsite/excel/src/Files/RemoteTemporaryFile.php:97

Laravel Excel 上的文档说要在 config/excel.php 中设置这些值

https://docs.laravel-excel.com/3.1/imports/queued.html#multi-server-setup

'temporary_files' => [
        'local_path'          => storage_path('framework/laravel-excel'),        
        'remote_disk'         => 's3',       
        'force_resync_remote' => true,

我的 vapor yml 文件具有以下存储设置,所有这些都可以在正确的 env 值下正常工作。用于蒸汽和当地发展

storage: **correct bucket name**

有没有人设法让 Laravel Excel 和 Vapor 使用 Queued Imports,如果有,您是如何管理的?文档并没有真正解释我应该使用什么值

【问题讨论】:

    标签: php laravel laravel-8 laravel-excel laravel-vapor


    【解决方案1】:

    尝试在配置文件中将local_path设置为tmp目录

    <?php
    
    return [
        'temporary_files' => [
            'local_path' => sys_get_temp_dir(),
            ...
        ],
    ];
    

    【讨论】:

      猜你喜欢
      • 2021-02-27
      • 1970-01-01
      • 2022-10-17
      • 2020-01-14
      • 1970-01-01
      • 2020-04-19
      • 1970-01-01
      • 2017-10-24
      • 2020-11-20
      相关资源
      最近更新 更多