亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何將文件從 Mayan EDMS 發送到外部 api?

如何將文件從 Mayan EDMS 發送到外部 api?

Helenr 2021-10-26 11:02:05
我還在學習 Django,還有很多我不知道的地方。問題是我無法將 .pdf(或任何其他格式)通過 ajax post 方法發送到外部 API。所以在接收端我只得到文件的字符串位置而不是實際文件。我已將以下 javascript 代碼放在generic_list_items_subtemplate.html 中{% load i18n %}{% load static %}{% load common_tags %}{% load navigation_tags %}<div class="row">    <div class="col-xs-12">        <h4>            {% if page_obj %}                {% if page_obj.paginator.num_pages != 1 %}                    {% blocktrans with page_obj.start_index as start and page_obj.end_index as end and page_obj.paginator.object_list|length as total and page_obj.number as page_number and page_obj.paginator.num_pages as total_pages %}Total ({{ start }} - {{ end }} out of {{ total }}) (Page {{ page_number }} of {{ total_pages }}){% endblocktrans %}                {% else %}                    {% blocktrans with page_obj.paginator.object_list|length as total %}Total: {{ total }}{% endblocktrans %}                {% endif %}            {% else %}                {% blocktrans with object_list|length as total %}Total: {{ total }}{% endblocktrans %}            {% endif %}        </h4>        <hr>        <div class="well center-block">            <div class="clearfix">                <div class="pull-right">                    <form action="{% url 'common:multi_object_action_view' %}" class="form-multi-object-action" method="get">                        {% if object_list %}在接收方我得到name = "file"value = "/documents/12/preview/"但我想獲取文件而不是這個字符串。我不知道如何定位文件以直接發送。
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 184 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號