5
我想實現一個窗體上傳文件,但開始做操作,當我點擊一個提交按鈕,問題是有一個奇怪的錯誤,我不知道什麼是它,我做了教程的例子,它的工作沒有問題,現在我實現相同,但與index.html,它不工作。按鈕提交R與閃亮
的錯誤是: 「錯誤的,如果(輸入$ uploadFasta == 0)返回(NULL): 參數爲長度爲零的」
我的index.html像:
<form class="span12 menu-med-upload">
<div class="row-fluid">
<center>
<div class="custom-input-file btn btn-inverse">
<input type="file" size="1" id="fileFasta" class="input-file" />
</div>
</center>
<button id="uploadFasta" type="button" class="btn action-button shiny-bound-input" >go!</button>
</div>
</form>
我server.R是這樣的:
output$table <- renderText({
if(input$uploadFasta == 0)
return(NULL)
myRenderTable()
})
有人知道出了什麼問題,並感謝所有和抱歉,如果這個話題是之前開放的,但我找不到。