我在读取一些文件时遇到404错误,剩下的文件显示数据没有错误。我无法找到我做错的地方,这里我保存上传的文件如下。任何帮助非常感谢。
File ftemp= new File(basePath +"//InvoiceInventory//"+store.name+"//SHOP//"+invoiceType+"//");
我的ui页面代码是:
@for(invoice <- invoiceList) {
<tr>
@if(invoice.storeId != 1){
<td><a href="/INVOICEPROCESSINGSYSTEM/@invoice.filePath" class="fancyboxPDF" title="@invoice.fileName" onclick="OpenFancyBox('@invoice.id');">@invoice.fileName</a></td>
}
@if(invoice.storeId == 1){
<td><a href="/INVOICEPROCESSINGSYSTEM/@invoice.filePath" class="fancyboxPDF" title="@invoice.fileName" onclick="OpenFancyBoxForHeadOffice('@invoice.id');">@invoice.fileName</a></td>
}
<td>@invoice.uploadedDate</td>
<td>@invoice.invoiceType</td>
<td>@Store.find.byId(invoice.storeId)</td>
</tr>
}
</tbody>
我的jquery方法是:
function OpenFancyBox(invoiceId){
//alert(invoiceId);
$(".fancyboxPDF").fancybox({
openEffect: 'elastic',
closeEffect: 'elastic',
width:1200,
height:1000,
autoSize: true,
type: 'iframe',
loop : false,
helpers : {
overlay : {closeClick: false}, // disables close when outside clcik
title : { // put title on the top
type: 'inside',
position : 'top'
}
},
beforeShow: function () {
if (this.title) {
// New line
this.title += '<br />';
// Add Form to Title
this.title += '<form action="/InvoiceInventory/list/move/'+invoiceId+'" method="post"><div class="table-responsive"><table style="background-color: white;border-color: #fff;" class="table table-bordered"><tr><td><div class="clearfix" id="category_field"><label for="category">Invoice Category</label><div class="input"><select id="invoiceCategoryAtFancyBox" name="category" onchange="disableSupplierListAtFancyBox()" required><option class="blank" value="">-- Choose --</option><option value="Fuel">Fuel</option><option value="Others">Others</option></select> <span class="help-inline"></span></div></div></td><td><div class="clearfix" id="invoiceDate_field"><label for="invoiceDate">Invoice Date</label><div class="input"><input type="text" class="datepickerFancyBox" name="invoiceDate" required><span class="help-inline"></span></div></div></td><td><div class="clearfix" id="paymentTerms_field"><label for="paymentTerms">Payment Terms</label><div class="input"><select id="paymentTermsFancyBox" name="paymentTerms" required><option class="blank" value="">-- Choose --</option><option value="CashPaid">CashPaid</option><option value="DD">DD</option><option value="FortNightly">FortNightly</option><option value="Weekly">Weekly</option><option value="Monthly">Monthly</option><option value="Others">Others</option></select> <span class="help-inline"></span></div></div></td><td><div class="clearfix" id="supplier_field"><label for="supplier">Supplier</label><div class="input"><select id="supplierListAtFancyBox" name="supplier" required onfocus="selectBoxOptionsInFancyBox()"><option class="blank" value="">-- Choose a Supplier--</option></select> <span class="help-inline"></span></div></div></td><td><input type="submit" value="Done" class="btn btn-success"> <a href="/InvoiceInventory/delete/'+invoiceId+'" class="btn btn-danger" onclick="return confirm('+" 'Are You sure want to Delete ?' "+')">Delete</a></td></tr></table></div></form>';
}
},
iframe: {
preload: false // fixes issue with iframe and IE
}
});
}