When testing this module it seems that only the site admin can upload files using the privatemsg_attachments feature. Users with other roles no matter they have permission set for 'upload private message attachments' cannot upload any file and instead any try to attach a file will render form-file error.

Any clue why?

Comments

arithmetric’s picture

Have you also given the these roles the "view private message attachments" permission?

Can you attach a screenshot of the form error?

miccelito’s picture

the view private message attachments permission was set correctly.

But I guess what was causing the form-file error...

Upload files (drupal's core Upload module) permission was set for 'authenticated user' and 'co-admin' which makes problem at File uploads admin page (/admin/settings/uploads) since the page will show only 'authenticated user' (and not the 'co-admin') settings.

Still, co-admins most of the times would need more file size cause a website may as well run other modules using file uploads i.e. Node Gallery, Plupload etc. As in my case where the co-admin wasn't able to upload a private message attachment since the default total file size had already been used by other modules.

So, it's better adding a new role i.e. 'upload' (upload by authenticated users) and auto assign that role (using the Auto Assign Role module). Then it's posibil to set default total file size per user by role i.e. 'upload' aka authenticated users 0.5MB, 'co-admin' 10MB etc.

arithmetric’s picture

Status: Active » Closed (works as designed)

Yes, since this module uses the core upload functionality, the uploads for attachments are limited by the same rules as configured for core uploads.

rayvan’s picture

Issue tags: +attachments not displaying, +attach file not working

Also important to note to select Yes for "List files by default" under admin/settings/uploads otherwise they won't be visible.