Uri Barenholz
Uri Barenholz

Reputation: 731

Can I have a file field in an input form?

I need to be able to automatically upload a file plus some related data to my Yesod server. I thought the best way to do it was using input-forms.

However, input forms don't seem to allow file fields.

  1. Am I correct or is there a way to use fileAFormReq inside an input form?
  2. If there is no such way then What will be the best strategy to follow (a.k.a. how to allow the server to accept files that are being sent by a script from a different machine, while having no real need to display a form at any point)?

Thanks,

Upvotes: 4

Views: 298

Answers (2)

Anonymous
Anonymous

Reputation: 23

Do you know about lookupFile?

(see What is the IForm equivalent to fileAFormOpt?)

Upvotes: 1

Scott Stevens
Scott Stevens

Reputation: 2651

Forms allow <input type="file" /> , is this what you are looking for?

Upvotes: 0

Related Questions