New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to use tagui using api directive to post a flie to Remote machine #1374
Comments
error: {"timestamp":"2024-04-26T01:25:49.657+0000","status":500,"error":"Internal Server Error","message":"Failed to parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: the request was rejected because no multipart boundary was found","path":"/File/"} |
and i have another question |
try to use Runs a command in Command Prompt or Terminal and saves the stdout to the variable
|
@marcelocecin hello run cmd /c D:\curl-8.7.1_7-win64-mingw\curl-8.7.1_7-win64-mingw\bin\curl.exe -X POST -F "file=@d:\rpa\rpademo\tuijian\1714300843597.txt" http://localhost:8080/File/ errors: but I use curl -X POST -F "file=@d:\rpa\rpademo\tuijian\1714300843597.txt" http://localhost:8080/File/ on cmd command ,that is ok. but using tagui ,error is The filename, directory name, or volume label syntax is incorrect. why? |
how to debug tagui source code? |
try using command arguments with single quotes |
@marcelocecin using single quotes is not ok . it is too hard to use. |
so try to create example: function send_attachment_url(msg,file,url) {
casper.options.waitTimeout = (30*1000);
casper.waitForExec('curl -F msg="'+msg+'" -F upload=@'+file+' '+url, null, function(response) {
run_result = '';
run_result = (response.data.stdout.trim() || response.data.stderr.trim()); run_result = run_result.replace(/\r\n/g,'\n');
run_json = response.data;
this.exit();},
function() {this.echo('ERROR - command to run exceeded '+(casper.options.waitTimeout/1000).toFixed(1)+'s timeout').exit();});
} then in your
PS: If it still doesn't work, I suggest testing sending it to an external url, for example https://webhook.site/ |
@marcelocecin thanks very much, i will try it first |
I optimize and refine the syntax of my code. Here's the updated version and it works on windows. @marcelocecin thanks so much js begin |
api_config = {method:'POST', header:['Content-type: multipart/form-data'], body:'name=sd&file=@C:\Users\Admin\AppData\Local\Postman\app-6.0.10\ffmpeg.dll'};
api http://localhost:8080/File/
echo
api_result
The text was updated successfully, but these errors were encountered: