add: move upload server to buckets
This commit is contained in:
parent
8116307ba0
commit
75fe720f21
83 changed files with 351 additions and 458 deletions
|
@ -421,7 +421,7 @@
|
|||
(span
|
||||
(str (text "general:label.could_not_find_post"))))
|
||||
(text "{%- endif %} {%- endif %}"))
|
||||
(text "{{ self::post_media(upload_ids=post.uploads) }} {% else %}")
|
||||
(text "{{ self::post_media(upload_ids=post.uploads, bucket=\"post_media\") }} {% else %}")
|
||||
(details
|
||||
("class" "card tiny lowered w_full")
|
||||
(summary
|
||||
|
@ -448,7 +448,7 @@
|
|||
(span
|
||||
(text "Could not find original post...")))
|
||||
(text "{%- endif %} {%- endif %}"))
|
||||
(text "{{ self::post_media(upload_ids=post.uploads) }}")))
|
||||
(text "{{ self::post_media(upload_ids=post.uploads, bucket=\"post_media\") }}")))
|
||||
(text "{%- endif %} {%- endif %}")
|
||||
|
||||
(text "{% if poll -%} {{ self::poll(post=post, poll=poll) }} {%- endif %}")
|
||||
|
@ -465,15 +465,15 @@
|
|||
(text "{% if community and show_community and community.id != config.town_square or question %}"))
|
||||
(text "{%- endif %} {%- endmacro %}")
|
||||
|
||||
(text "{% macro post_media(upload_ids, custom_click=false) -%} {% if upload_ids|length > 0 -%}")
|
||||
(text "{% macro post_media(upload_ids, custom_click=false, bucket) -%} {% if upload_ids|length > 0 -%}")
|
||||
(div
|
||||
("class" "media_gallery gap_2")
|
||||
(text "{% for upload in upload_ids %}")
|
||||
(img
|
||||
("src" "/api/v1/uploads/{{ upload }}")
|
||||
("src" "{{ config.service_hosts.buckets }}/{{ bucket }}/{{ upload }}")
|
||||
("data-upload-id" "{{ upload }}")
|
||||
("alt" "Image upload")
|
||||
("onclick" "{% if custom_click -%} {{ custom_click }} {%- else -%} trigger('ui::lightbox_open', ['/api/v1/uploads/{{ upload }}']) {%- endif %}"))
|
||||
("onclick" "{% if custom_click -%} {{ custom_click }} {%- else -%} trigger('ui::lightbox_open', ['{{ config.service_hosts.buckets }}/{{ bucket }}/{{ upload }}']) {%- endif %}"))
|
||||
(text "{% endfor %}"))
|
||||
(text "{%- endif %} {%- endmacro %} {% macro notification(notification) -%}")
|
||||
(div
|
||||
|
@ -825,7 +825,7 @@
|
|||
("id" "question_content:{{ question.id }}")
|
||||
(text "{{ question.content|markdown|safe }}"))
|
||||
; question drawings
|
||||
(text "{{ self::post_media(upload_ids=question.drawings) }}")
|
||||
(text "{{ self::post_media(upload_ids=question.drawings, bucket=\"drawings\") }}")
|
||||
; asking about
|
||||
(text "{% if asking_about -%}")
|
||||
(text "{{ self::post(post=asking_about[1], owner=asking_about[0], secondary=not secondary, show_community=false) }}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue