OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

This topic contains 1 reply, has 2 voices, and was last updated by Andrey Yatsenko Andrey Yatsenko 8 months, 1 week ago.

  • Creator
    Topic
  • #37675

    Farid
    Participant

    Hello,
    I’m trying to generate a link to files with specific id in app/attachment directory with public access.
    These files are added using AttachmentBundle, Now I need a way to generate a link to these files without authentication.
    I created a path in security.yml that does not require authentication

    But still as I type its route “http://localhost/admin/property/rest/{id}” ({id} is my property id) I keep seeing admin login page also I created a token for this action but it didn’t work.

    How can I solve this issue with attachment file access??

    Regard,
    Farid

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #37773
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    The easier way will be to allow everyone to access all the attachments by desired user roles using configuration.

    Go to System / User Management / Roles, select the role, edit permissions for an Attachment entity to allow full access, and save.

    In case you want to handle it from code by the security configuration. Because the build in controllers that serves attachments already have Security checks that can’t be disabled, there is no way to make it publicly accessible.
    Instead, I’d recommend to create a new controller without any security checks and serve it by the new firewall with security: false configuration.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No