• anujmcapanorama_fish_eye
    2 posts
    5 years ago

    Hi Friends,

    I am trying to use "Amazon S3 Bucket" for storing the attachments uploaded in any post or reply.

    Misago is currently placing all the attachments inside /media/attachments/{{postId}}/{{hash code}}. We want to avoid this getting uploaded on our web server, and S3 buckets are a cheaper alternative.

    Could you please help us guiding with this?

    Regards,
    Anuj

  • arrow_forward

    Thread has been moved from Feedback, Ideas and Suggestions.

  • rafalplens
    5 years ago

    Hi!

    This is actually possible to do.

    First, create file named requirements-plugins.txt in the same directory that contains requirements.txt (it should be misago). Inside this file put this line:

    django-storages
    

    Next, create settings_override.py file in same directory that contains settings.py (it should be misago/misagodocker). Fill its contents like this:

    DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
    
    AWS_ACCESS_KEY_ID = "YOUR AWS ACCESS KEY ID HERE"
    AWS_SECRET_ACCESS_KEY = "YOUR AWS SECRET ACCESS KEY HERE"
    AWS_STORAGE_BUCKET_NAME = "YOUR BUCKET NAME"
    AWS_S3_REGION_NAME = "YOUR REGION NAME"
    

    Remember to fill in valid values to AWS_ settings!

    Then, run ./appctl rebuild to rebuild your Misago site. After rebuild is complete, Misago should use S3 for uploads storage.

  • rezapanorama_fish_eye
    15 posts
    2 years ago

    Does it support large files to be uploaded as parts(s3)?

  • rafalplens
    2 years ago

    No. It was never optimized for that. In v4 you will be able to solve this by implementing custom plugin, but I don't plan for having that in core.

Search
  • Enter search query (at least 3 characters).

Your options