OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Attachment directory

This topic contains 1 reply, has 2 voices, and was last updated by  Andrey Yatsenko 5 years, 4 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • 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
    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)

The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

Back to top