diff --git a/prod/upload/upload.lua b/prod/upload/upload.lua index 1438b7d..e8e0f8c 100644 --- a/prod/upload/upload.lua +++ b/prod/upload/upload.lua @@ -63,9 +63,14 @@ while true do local http = require "resty.http" local httpc = http.new() local remote_url = string.format("%s/api/v1/ts/create_task", task_server) + ngx.log(ngx.INFO, 'remote_url -> ', remote_url) - ngx.log(ngx.INFO, 'authorization -> ', ngx.req.get_headers().Authorization) + ngx.log(ngx.INFO, 'Authorization -> ', ngx.req.get_headers().Authorization) ngx.log(ngx.INFO, 'HtySudoerToken -> ', ngx.req.get_headers().HtySudoerToken) + + local body_text = cjson.encode({task_type = TaskTypes.UPLOAD_PICTURE, data = {images = files}}) + + ngx.log(ngx.INFO, 'UPLOAD_PICTURE body_text ->', body_text) local res, err = httpc:request_uri( remote_url, { @@ -75,7 +80,7 @@ while true do ["Authorization"] = ngx.req.get_headers().Authorization, ["HtySudoerToken"] = ngx.req.get_headers().HtySudoerToken }, - body = cjson.encode({task_type = TaskTypes.UPLOAD_PICTURE, data = {images = files}}), + body = body_text, } ) if 201 ~= res.status then