View more context

 

tractorcow

and $this->file->getAllowedExtensions() will map that image category to the list of extensions

bendubuisson

so to be clear, I am on the non Image DataObjects which has an image, when I upload the image, everything is fine, whgen I try to publish the DO, I get that error

tractorcow

yes but the error is coming from Image::validate()

tractorcow

At least, I am assuming this, based on what i've been told 😜

tractorcow

In DBFile add this

  1. protected function isValidFilename($filename)
  2. {
  3. $extension = strtolower(File::get_file_extension($filename));
  4.  
  5. // Validate true if within the list of allowed extensions
  6. $allowed = $this->getAllowedExtensions();
  7. if ($allowed) {
  8. $ok = in_array($extension, $allowed);
  9. if (!$ok) {
  10. var_dump($allowed);
  11. var_dump($extension);
  12. die;
  13. }
  14. return $ok;
  15. }
bendubuisson

@tractorcow I get the same error but via the notification thingy instead 😛