Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Communicate attachments fail to upload while file directories are fine #4811

@robinsowell

Description

@robinsowell

Not sure this is a bug, but it's worth bringing up for an extra set of eyeballs.

Had a user, current EE, file upload work fine except when making attachments to emails in Communicate. You submit- it fails and comes back with a validation error 'There was a problem attaching your file'.

Turns out they were on Plesk and there is no “upload_tmp_dir” set so in plesk we have to set a PHP variable:

upload_tmp_dir = /var/www/rob1/httpdocs/tmp

This got it working, but it is interesting that it wasn't necessary for other uploads. I did notice in the communicate controller:

        ee()->upload->initialize(array(
            'allowed_types' => '*',
            'use_temp_dir' => true
        ));

Not entirely sure why use_temp_dir is explicitly set to true there and I suspect that's why the different behavior. So again- not at all sure it's a bug, but if it's not, we might drop a note in the troubleshooting section of the docs about it. Pretty rare thing, but still confusing to the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: UnconfirmedBug report that is not yet confirmed and/or is not reproducible.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions