I'm using the Quickbase C# SDK to submit a form to Quickbase from an external site. I want to attach a file along with the form and can't seem to figure out how to do so.
Below is a stripped version of my code:
ASPX
<form id="form1" runat="server">
<asp:TextBox ID="txtFileName" CssClass="textbox" Columns="40" runat="server"></asp:TextBox>
<input type="file" id="attachment1" runat="server" />
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" />
</form>
CS
protected void btnSubmit_Click(object sender, EventArgs e)
{
IQClient client = QuickBase.Login("username", "password", "domain");
IQApplication app = client.Connect("db_id", "app_token";
AppInfo appInfo = app.GetApplicationInfo();
IQTable table = app.GetTable("table_id");
IQRecord newRecord = table.NewRecord();
newRecord["File Name"] = txtFileName.Text;
// attach file?
newRecord.AcceptChanges();
table.AcceptChanges();
client.Logout();
}
Thanks in advance.