LoginSignup
0
0

More than 3 years have passed since last update.

NetCommons2のファイルアップロード時にでてくるダイアログについて

Last updated at Posted at 2021-01-29

旧会社HPからの転記です。

ファイルアップロード時に、アップロード処理の時間が長いと
「アップロードが失敗したか、タイムアウトになった可能性があります。処理を続行しますか?」

image.png

とダイアログが出る事がありますが、
カスタマイズ時に非表示にできないか調べました。

https://github.com/netcommons/NetCommons2/blob/537e08b7a2892bacd2eed5dbac3ea45792de0f36/html/webapp/modules/common/files/js/common.js#L2451

webapp/modules/common/files/js/common.js
/*timeout_flag:0の場合、タイムアウトチェックをしない     */
/*********************************************************/
sendAttachment: function(params_obj) {

上記パラメータをセットすれば、できる。

サンプルJS

    /**
     * ファイルアップロード
     */
    uploadFile: function() {

        var messageBody = new Object();
        messageBody["action"] = "custummodule_action_main_import";

        var option = new Object();
        option["param"] = messageBody;
        option["top_el"] = $(this.id);
        option["timeout_flag"] = 0;            // タイムアウトチェックをしない
        option["callbackfunc"] = function(response) {
            commonCls.alert("インポートしました。");
            commonCls.sendRefresh(this.id);
        }.bind(this);
        option["callbackfunc_error"] = function(file_list, res){
            commonCls.alert(res);
        }.bind(this);
        commonCls.sendAttachment(option);
    },

ではでは。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0