Skip to content
This repository was archived by the owner on Nov 16, 2022. It is now read-only.
This repository was archived by the owner on Nov 16, 2022. It is now read-only.

File `` could not be copied CannotUploadFileException #243

@anuj9196

Description

@anuj9196
       $this->addBehavior('Proffer.Proffer', [
            'icon' => [
                'root' => WWW_ROOT . 'img',
                'dir' => 'icon_dir',
                'thumbnailSizes' => [
                    '8x8' => [
                        'w' => 8,
                        'h' => 8,
                        'jpeg_quality' => 100
                    ],
                    '16x16' => [
                        'w' => 16,
                        'h' => 16,
                        'jpeg_quality' => 100
                    ],
                    '32x32' => [
                        'w' => 32,
                        'h' => 32,
                        'jpeg_quality' => 100
                    ],
                  
                'thumbnailMethod' => 'gd'
            ]
        ]);

There is no validation I have applied.

Form

    <?= $this->Form->create($sharingNetwork, ['type' => 'file']) ?>
    <fieldset>
        <legend><?= __('Add Sharing Network') ?></legend>
        <?php
            echo $this->Form->control('title');
            echo $this->Form->control('icon', ['type' => 'file']);
            echo $this->Form->control('description');
        ?>
    </fieldset>
    <?= $this->Form->button(__('Submit')) ?>
    <?= $this->Form->end() ?>

On submit, it throws an exception

File `` could not be copied. 
Proffer\Exception\CannotUploadFileException

Directory is being created in the filesystem by file is not uploading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions