के साथ फ़ाइल इनपुट सामग्री प्राप्त करना मैंने HTML फ़ाइल फ़ाइल API का उपयोग करके जावास्क्रिप्ट में फ़ाइल इनपुट से सामग्री पढ़ने के लिए simple ways देखा है।फ़ेबल
यह मेरा view
विधि, एक छोटे से fable-arch
एप्लिकेशन के अंदर है:
let view model =
div [
attribute "class" "files-form"
] [
form [
attribute "enctype" "multipart/form-data"
attribute "action" "/feed"
attribute "method" "post"
] [
label [ attribute "for" "x_train" ] [ text "Training Features" ]
input [
attribute "id" "x_train"
attribute "type" "file"
onInput (fun e -> SetTrainingFeaturesFile (unbox e?target?value))
]
]
model |> sprintf "%A" |> text
]
- वहाँ फ़ाइल एफ # से सीधे सामग्री पर कब्जा करने का आसान तरीका है?
- इसे पूरा करने के लिए आवश्यक इंटरऑप फेल कोड की न्यूनतम मात्रा क्या है?
फेल चैनल में सभी सुझावों के लिए धन्यवाद @MangelMaxime। :-) – VillasV