Skip to content

Uploader configurations are not set correctly #1

@iainheng

Description

@iainheng

I found that the uploader can't retrieve the options correctly where by I have set the options as below

FlmngrServer::flmngrRequest(
    array(
        'dirFiles' => storage_path('app/public/uploads/files'),
        'dirTmp'   => storage_path('app/files/temp'),
        'dirCache'   => storage_path('app/files/cache'),
        'uploader' => [
            'allowedExtensions' => 'png,jpeg,jpg,svg,webp,bmp,gif',
            'maxUploadFileSize' => 800000, // max 800Kb
        ],
    )
);

The allowedExtensions and maxUploadFileSize are not pick up by the upload action correctly.

I believe the issue lies at this line of code

"config" => isset($config["uploader"]) ? $config["uploader"] : [],

I have to reset the uploader configurations as below to make it work temporary

if (isset($config["uploader"])) {
    $configUploader = array_merge($configUploader, $config["uploader"]);
}

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions