#how can pass form to rust backend
28 messages · Page 1 of 1 (latest)
"C:\fakepath\IMG_20221130_135406.jpg"
what is this
fakepath
i pass the path
but yhis fake path always passed not true one
its access issue right?
so i need to add this to allowlist
"path": {
"all": true
}
not work
even in devtools i console loge it
and it give me fakepath
how should i fix this
How do you get your path ?
i make allowlist all to true but not work
idk how can i fix this
I mean what code do you use
<form id="form" name="form">
<select name="map" id="map-select"></select>
<select name="agent" id="agent-select"></select>
<br>
<br>
<label for="location">Location</label><br>
<input name="location" type="file" accept="image/png, image/jpeg">
<br>
<label for="position">Position</label><br>
<input name="position" type="file" accept="image/png, image/jpeg">
<br>
<label for="result">Result</label><br>
<input name="result" type="file" accept="image/png, image/jpeg">
<br>
<br>
<label for="note">Note</label><br>
<textarea name="note" cols="40" rows="5"></textarea>
<button type="button" id="save-btn">Save</button>
<button type="button" id="cancel-btn">Cancel</button>
</select>
</form>
function getFormData() {
let form = document.forms["form"];
return {
"map": form["map"].value,
"agent": form["agent"].value,
"location": form["location"].value,
"position": form["position"].value,
"result": form["result"].value,
"note": form["note"].value
}
}
Use tauri api dialog instead
can u get me some example or link ?
for study
Yeah see this https://tauri.app/v1/api/js/dialog#open
thanks it works fine
how can i end this thread?
i mean