spacebase / spacebasenz

Website for SpaceBase New Zealand
http://dev-spacebasenz.pantheonsite.io/
GNU General Public License v2.0
0 stars 0 forks source link

372 - Direct Messaging in Dev: Uploading images #378

Closed treasuretron closed 4 years ago

treasuretron commented 4 years ago

In GitLab by @epaatdahlstrom on May 9, 2019, 18:39

For uploading images within a message. There is no guideline for size limit. I have successfully uploaded images that are small but if testing bigger images, it just gives an error that it needs the file to upload and does not say what was the problem in the first place. See image errorScreenshot_2019-05-10_10.34.28

treasuretron commented 4 years ago

In GitLab by @epaatdahlstrom on May 9, 2019, 18:41

Essentially, it throws out the image file being uploaded if huge and shows the above error - as if there was no image file being uploaded. Is there a way to show image file limit before trying to upload?

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on May 9, 2019, 18:45

changed title from Direct Messaging in Dev: Uploading images to {+372 - +}Direct Messaging in Dev: Uploading images

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on May 9, 2019, 18:46

@epaatdahlstrom because we haven't tested this with images so far, it's out of scope for this deployment. I'll disable images and formatting in general from messages to prevent this problem from arising.

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on May 9, 2019, 19:02

I think we need this module to clean up what text formats are available where https://www.drupal.org/project/allowed_formats

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on May 9, 2019, 20:45

Looking into the module above, it only allows one to set the text format on the field settings, and the private_message custom entity doesn't have field settings, so that's not going to work.

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on May 9, 2019, 21:41

I've set the default text format to plain text, but users will still be able to change the input format to basic HTML which will allow them to find the image bug. This change would also require users editing other content to switch to basic html if they wanted to add anything other than plain text to any other input format. I'll see if installing the allowed_formats module can be used to restrict the use of plain text in other circumstances, reducing the confusion. Overall I don't know why there are so many text formats.

treasuretron commented 4 years ago

In GitLab by @epaatdahlstrom on May 12, 2019, 00:14

quick fix looks good. Will have to deal with image size later.

treasuretron commented 4 years ago

In GitLab by @epaatdahlstrom on May 12, 2019, 00:14

closed