Pure ASP.NET Upload 2 Support Product Page
This topic was archived
Insert ignores filename
Reported 09 Mar 2005 19:37:12
1
has this problem
09 Mar 2005 19:37:12 John McTigue posted:
I have duplicated your upload and insert record tutorial using my database. I'm also using Smart Image Processor to generate a thumbnail. When I execute the upload, I get the upload and I get a record in my database, but the filename ("LargeFileName"<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<%@ Register TagPrefix="DMXzone" NameSpace="PureUpload" Assembly="PureUpload" %>
<%@ Register TagPrefix="Image" Namespace="PUImageProcessor" Assembly="PUImageProcessor" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<MM<img src=../images/dmxzone/forum/icon_smile_blush.gif border=0 align=middle>nsert
runat="server"
CommandText='<%# "Insert Into babies (ID,DateOfBirth,LargeFileName) Values (@BID,@DOB,@LF)" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING"
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE"
Expression='<%# Request.Form("MM_insert"
CreateDataSet="false"
SuccessURL='<%# "default.aspx" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@BID" Value='<%# IIf((Request.Form("BID"
<Parameter Name="@DOB" Value='<%# IIf((Request.Form("DOB"
<Parameter Name="@LF" Value='<%# IIf((pfu.getFileName("LargeFileName"
</Parameters>
</MM<img src=../images/dmxzone/forum/icon_smile_blush.gif border=0 align=middle>nsert>
<MM
id="DSBabies"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING"
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE"
CommandText='<%# "Select * FROM Babies" %>'
Debug="true"
> </MM
<MM<img src=../images/dmxzone/forum/icon_smile_tongue.gif border=0 align=middle>ageBind runat="server" PostBackBind="true" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Administrators</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../css/styles.css" rel="stylesheet" type="text/css">
<script language='javascript' src='../../ScriptLibrary/incPureUpload.js'></script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form action="" method="post" enctype="multipart/form-data" name="form1" runat="server" onSubmit="checkFileUpload(this,'GIF,JPG,JPEG,BMP,PNG',true,2000,'','','','','','');showProgressWindow('blueFlashProgress.htm',300,50);return document.MM_returnValue">
<div id="content">
<table width="100%">
<tr>
<td valign="top" class="formtext1"> </td>
<td valign="top"> </td>
</tr>
<tr>
<td width="20%" valign="top" class="formtext1"><div align="right"><b>ID: </b></div></td>
<td valign="top"><input class="formtext2" type="text" id="DOB" name="BID" size="10" maxlength="15"></td>
</tr>
<tr>
<td valign="top" class="formtext1"> </td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top" class="formtext1"><div align="right"><b>Date Of Birth: </b></div></td>
<td valign="top" class="formtext2"><input class="formtext2" type="text" id="DOB" name="DOB" size="10" maxlength="10"> - ex. 12/31/2004</td>
</tr>
<tr>
<td valign="top" class="formtext1"> </td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"class="formtext1"><div align="right"><b>Picture: </b></div></td>
<td valign="top"><input id="LargeFileName" name="LargeFileName" type="file" class="formtext2" onChange="checkOneFileUpload(this,'GIF,JPG,JPEG,BMP,PNG',true,2000,'','','','','','')" size="32" runat="server">
<Image:SmartImageProcessor runat="server" Component="ASP.NET" ResizeImage="true" ResizeWidth='267' ResizeHeight='400' ResizeQuality='80' ResizeAspect="true" MakeThumbnail="true" ThumbPath="/gallery/album1" ThumbWidth='93' ThumbHeight='140' ThumbQuality='70' ThumbAspect="true" PrePost="suffix" FixValue='_small' RedirectUrl="" TheVersion="1.0.1" />
</td>
</tr>
<tr>
<td valign="top"> </td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"> </td>
<td valign="top"><input name="MM_insert" type="hidden" value="form1">
<asp:button ID="submit1" runat="server" Text="Add Baby" /></td>
</tr>
<tr>
<td colspan="2" align="left"> <DMXzone<img src=../images/dmxzone/forum/icon_smile_tongue.gif border=0 align=middle>ureFileUpload runat="server" id="pfu" ThePath="../../gallery/album1" Redirect="" StoreType="file" TimeOut="1800" SizeLimit="2000" Extensions="GIF,JPG,JPEG,BMP,PNG" NameConflict="over" MaxHeight="" MinHeight="" RequireUpload="true" MinWidth="" MaxWidth="" SaveWidth="" SaveHeight="" FormName="form1" ProgressBar="blueFlashProgress.htm" ProgressWidth="300" ProgressHeight="50" TheVersion="2.0.2" /> </td>
</tr>
</table>
</div>
</form>
</body>
</html>
Thanks
Replies
Replied 03 Jul 2006 18:58:31
03 Jul 2006 18:58:31 Robbie Laliberte replied:
Um.... hello?!?
Anyone going to address this question? Fundamental flaw here.
Extension usefulness easily cut in half without the ability to save the information to the database.
Original tales of Dark Fantasy and Horror. www.theHarrow.com
Edited by - chariot on 03 Jul 2006 19:01:45
Edited by - chariot on 03 Jul 2006 19:11:41
Edited by - chariot on 03 Jul 2006 19:11:59
Anyone going to address this question? Fundamental flaw here.
Extension usefulness easily cut in half without the ability to save the information to the database.
Original tales of Dark Fantasy and Horror. www.theHarrow.com
Edited by - chariot on 03 Jul 2006 19:01:45
Edited by - chariot on 03 Jul 2006 19:11:41
Edited by - chariot on 03 Jul 2006 19:11:59
Replied 07 Jul 2006 17:23:59
07 Jul 2006 17:23:59 Robbie Laliberte replied:
No answer yet.
I'll give it until next week for answer, then I email George directly as that seems to be the best way to get answers around here.
Original tales of Dark Fantasy and Horror. www.theHarrow.com
I'll give it until next week for answer, then I email George directly as that seems to be the best way to get answers around here.
Original tales of Dark Fantasy and Horror. www.theHarrow.com
Replied 13 Jul 2006 18:54:08
13 Jul 2006 18:54:08 Robbie Laliberte replied:
here's a way around the issue for the moment (requires .Net Framework 1.1.4X or higher, not sure why)
First, be sure and make the file input box a server control by inserting runat="server"
input type="file" name="filename" id="filename" runat="server"
Then manually update the DW Insert code parameter
Parameter Name="@filename" Value='<%# IIf(filename.Value <> Nothing, filename.Value.Substring(filename.Value.LastIndexof("\"
+ 1), ""
%>' type="Nchar"
You want to make sure and insert the name of your file field for "filename" as it is listed above, and be sure and use your own type for the Parameter insert. As I stated above this works on .Net framework 1.1.4x and above, and most definetly not on 1.0.X -- and no on I now has been able to determine why that is.
I have had to adjust the above code slightly because the code options on the forum seem to either not work in preview or to be disable completely.
Original tales of Dark Fantasy and Horror. www.theHarrow.com
First, be sure and make the file input box a server control by inserting runat="server"
input type="file" name="filename" id="filename" runat="server"
Then manually update the DW Insert code parameter
Parameter Name="@filename" Value='<%# IIf(filename.Value <> Nothing, filename.Value.Substring(filename.Value.LastIndexof("\"
You want to make sure and insert the name of your file field for "filename" as it is listed above, and be sure and use your own type for the Parameter insert. As I stated above this works on .Net framework 1.1.4x and above, and most definetly not on 1.0.X -- and no on I now has been able to determine why that is.
I have had to adjust the above code slightly because the code options on the forum seem to either not work in preview or to be disable completely.
Original tales of Dark Fantasy and Horror. www.theHarrow.com
Replied 09 Sep 2006 03:53:33
09 Sep 2006 03:53:33 Robbie Laliberte replied:
BAH!!!!
Ignore my RANTS. I feel like a flaming jackass.
I do think there is something wrong with the upload progress bars, but other than that... extension works fine IF you remember to upload all the necessary files! Upload your bin folder and your Script Library, most problems solved!
Original tales of Dark Fantasy and Horror. www.theHarrow.com
Ignore my RANTS. I feel like a flaming jackass.
I do think there is something wrong with the upload progress bars, but other than that... extension works fine IF you remember to upload all the necessary files! Upload your bin folder and your Script Library, most problems solved!
Original tales of Dark Fantasy and Horror. www.theHarrow.com
Replied 17 Oct 2006 15:05:05
17 Oct 2006 15:05:05 Robbie Laliberte replied:
Ok... we're back to this again.
Why does this sometimes work and sometimes not work? Any ideas? Because this was working before I had my SIP problems; now that's fixed, and this is not working again!
What's the deal? Can we figure out what is going on here?
Original tales of Dark Fantasy and Horror. www.theHarrow.com
Why does this sometimes work and sometimes not work? Any ideas? Because this was working before I had my SIP problems; now that's fixed, and this is not working again!
What's the deal? Can we figure out what is going on here?
Original tales of Dark Fantasy and Horror. www.theHarrow.com
Replied 18 Oct 2006 02:29:54
18 Oct 2006 02:29:54 Robbie Laliberte replied:
Riddle me this:
2 machines, sa OS, same version of DW, same version of Asp.Net Upload: build a page on one machine and everything works flawleslly; but build it on the other machine and the file name fails to insert into the database.
Now that's a good one.
Original tales of Dark Fantasy and Horror. www.theHarrow.com
2 machines, sa OS, same version of DW, same version of Asp.Net Upload: build a page on one machine and everything works flawleslly; but build it on the other machine and the file name fails to insert into the database.
Now that's a good one.
Original tales of Dark Fantasy and Horror. www.theHarrow.com
Replied 11 Sep 2008 04:35:43
11 Sep 2008 04:35:43 Kevin Robson replied:
A way I have found to get the filename is to use pfu.getFileName("yourFileFieldName"
instead of Request.Form("yourFileFieldName"