c++ - file paths been passed to a Json Array -


I want to allow a user to specify a file path to attach to an email.

For example

  /documents/myfile.dat  

index.html

  & Lt; Label & gt; Attachment: & lt; / Label & gt; & Lt; Input id = "attachment type" type = "text" / & gt;  

index.js

  var jsonEmail = {... "attachment": document.getElementById ('attachmentType'). Value}  

. Cpp

  Jason :: Value input; Bool parse = reader.parse (inputstring, input); If (parse) {... Json :: Value msgAtt = Input ["attachment"]; ... if (msgAtt.isArray ()) {foreach (Jason :: Price, msgAt) {anything here ...}} else {QString filePath = QString :: fromStdString (msgAtt.asString ()); Here are some more things ...}  

This works fine and is the proper path. I have a problem when I send multiple file paths:

  /sdcard/documents/myfile.dat, /sdcard/documents/nextfile.dat  

JSON value is never recognized as an array I know that through path I I can read and pull data according to the need, but I am hoping that this data is controlled by the passage and / or the way it is read. Can be?


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -