ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 3 replies, has 2 voices, and was last updated by Mike Kudelya Mike Kudelya 12 months ago.

  • Creator
    Topic
  • #24169

    manuel.distefano
    Participant

    Hello folks,

    i have a problem. I have a custom entity with a manyToOne to “Oro\Bundle\AttachmentBundle\Entity\File”, and Organization / Owner configured to the entity.

    I have the entity form with FileType. Now, if i try to upload an image all is ok, but if i try to upload a pdf i get “The mime type of the file is invalid (“application/pdf”). Allowed mime types are “image/gif”, “image/jpeg”, “image/png””, caused by vendor/oro/platform/src/Oro/Bundle/AttachmentBundle/Validator/ConfigFileValidator.php

    because it’s not === “file”. How can i configure it? There is a reference where i can check entity configuration?

    Tnx

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #24233
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi

    Here is example how you can configure attachment:

    Create migration

    Add form field

    Here is list of available mime types. Allow or disable you can in System -> Configuration -> Upload Settings.

    #24313

    manuel.distefano
    Participant

    Hi Mike,

    There is any way to configure this via @ConfigField annotation?Or any other annotation.

    Tnx

    #24329
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi

    As i know it is possible only with migration.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.