|
Rank: Newbie Groups: Member
Joined: 8/31/2007 Posts: 4
|
When using AJAXUploader in Firefox 2.0.0.6 and IE 7, I notice that Firefox renders the controls progessbar correctly, but IE seems to show the progess from right to left and never completes the bar, this looks strange.
Also in Firefox the ClientFileName returns only the File part, but IE returns the original path.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
We have already changed the ClientFileName to only return the file name. So next build will return the file path only on both browsers.
ProgressBar can have various strange rendering result sometimes. Can you post your .aspx file so that we can take a look? As soon as we can reproduce it at here, we should be able to find out the offending part and either fix it or suggest an workaround.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 8/31/2007 Posts: 4
|
eo_support wrote:Hi,
We have already changed the ClientFileName to only return the file name. So next build will return the file path only on both browsers.
ProgressBar can have various strange rendering result sometimes. Can you post your .aspx file so that we can take a look? As soon as we can reproduce it at here, we should be able to find out the offending part and either fix it or suggest an workaround.
Thanks Nothing Exciting...
Code: Visual Basic.NET
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="picupload.aspx.vb" Inherits="admin_picupload" MasterPageFile="~/admin/master.master" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<asp:Content ContentPlaceHolderID="Content" ID="Main" runat="server">
<div align="center">
<h4><asp:Label id="SystemError" Runat="server"></asp:Label></h4>
<br />
<form method="post" runat="server">
<eo:AJAXUploader ID="AJAXUploader1" runat="server" Width="250px" TempFileLocation="D:\Temp" AutoPostBack="true" Rows="4"></eo:AJAXUploader>
</form>
</div>
</asp:Content>
Code: Visual Basic.NET
Imports System.Data
Imports System.Data.Odbc
Imports System.Drawing
Imports System.IO
Partial Class admin_picupload
Inherits System.Web.UI.Page
Protected Sub AJAXUploader1_FileUploaded(ByVal sender As Object, ByVal e As System.EventArgs) Handles AJAXUploader1.FileUploaded
Dim intCount As Integer = 0
Dim intLoop As Integer
Dim strPics(12) As String
Dim strFilename As String
Dim strDirectory As String
Dim strSQL As String
Dim bmpInput As Bitmap
Dim bmpThumb As Bitmap
Dim intWidth As Integer
Dim intHeight As Integer
For intLoop = 0 To AJAXUploader1.PostedFiles.Length - 1
If AJAXUploader1.PostedFiles(intLoop).TempFileName.Length Then
If InStr(AJAXUploader1.PostedFiles(intLoop).ClientFileName, "\") Then
strFilename = AJAXUploader1.PostedFiles(intLoop).ClientFileName
While InStr(strFilename, "\")
strFilename = Mid(strFilename, InStr(strFilename, "\") + 1)
End While
Else
strFilename = AJAXUploader1.PostedFiles(intLoop).ClientFileName
End If
File.Move(AJAXUploader1.PostedFiles(intLoop).TempFileName, Path.Combine(Server.MapPath("/data/inbound/"), strFilename))
strPics(intCount) = strFilename
intCount += 1
End If
Next
Dim zeDataConnection As New OdbcConnection(Application("DSNName"))
zeDataConnection.Open()
Dim zeDataCommand As New OdbcCommand("SELECT Name FROM tblGallery WHERE ID = " + Request.QueryString("ID").ToCharArray, zeDataConnection)
strDirectory = zeDataCommand.ExecuteScalar
zeDataCommand.Dispose()
If intCount Then
For intLoop = 0 To intCount - 1
If Not File.Exists(Path.Combine(Server.MapPath("/..PRIVATE../" + strDirectory), strPics(intLoop))) Then
bmpInput = System.Drawing.Image.FromFile(Path.Combine(Server.MapPath("/..PRVATE../"), strPics(intLoop)))
If bmpInput.Height > bmpInput.Width Then
intHeight = 1024
intWidth = bmpInput.Width * intHeight / bmpInput.Height
bmpThumb = New Bitmap(intWidth, intHeight, bmpInput.PixelFormat)
Dim gfxThumb As Graphics = Graphics.FromImage(bmpThumb)
gfxThumb.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
gfxThumb.InterpolationMode = Drawing2D.InterpolationMode.Bilinear
gfxThumb.DrawImage(bmpInput, 0, 0, intWidth, intHeight)
bmpThumb.Save(Path.Combine(Server.MapPath("/..PRIVATE../" + strDirectory), strPics(intLoop)))
bmpThumb.Dispose()
Else
intWidth = 1024
intHeight = bmpInput.Height * intWidth / bmpInput.Width
bmpThumb = New Bitmap(intWidth, intHeight, bmpInput.PixelFormat)
Dim gfxThumb As Graphics = Graphics.FromImage(bmpThumb)
gfxThumb.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
gfxThumb.InterpolationMode = Drawing2D.InterpolationMode.Bilinear
gfxThumb.DrawImage(bmpInput, 0, 0, intWidth, intHeight)
bmpThumb.Save(Path.Combine(Server.MapPath("/..PRIVATE../" + strDirectory), strPics(intLoop)))
bmpThumb.Dispose()
End If
bmpInput.Dispose()
strSQL = "INSERT INTO tblGalleryItems ("
strSQL += "GalleryID, PictureFile"
strSQL += ") VALUES ("
strSQL += Request.QueryString("ID").ToString + ", "
strSQL += "'" + strPics(intLoop) + "')"
Dim imDataCommand As New OdbcCommand(strSQL, zeDataConnection)
imDataCommand.ExecuteNonQuery()
imDataCommand.Dispose()
End If
File.Delete(Path.Combine(Server.MapPath("/..PRIVATE../"), strPics(intLoop)))
Next
End If
zeDataConnection.Close()
zeDataConnection.Dispose()
AJAXUploader1.ClearPostedFiles()
Response.Redirect("pictureshow.aspx?id=" + Request.QueryString("ID").ToString)
End Sub
End Class
As you see there are upto four inputs which are then Thumbnailed and saved on the server in a private area, the customer is sending images that are 3072*2304.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Do you have the page online? Since you only posted the content page so we can't really get the full view because we do not know how your master page looks like.
A separate question that might be irrelevant: why do you put the uploader inside a separate form element? Do you mean that you do not have a form element at all in your master page?
|
|
Rank: Newbie Groups: Member
Joined: 8/31/2007 Posts: 4
|
eo_support wrote:A separate question that might be irrelevant: why do you put the uploader inside a separate form element? Do you mean that you do not have a form element at all in your master page? The Master page is purely for the menu section of the admin server, stylesheets and Javascripts. There are no forms in the master page. PM Message sent with server details...
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Thanks! What if you temporarily comment out your style sheet in your master page?
|
|
Rank: Newbie Groups: Member
Joined: 8/31/2007 Posts: 4
|
Removing the style libraries makes no difference, the Progress bar in Internet Explorer still displays wrongly... Have got screen captures, taken locally (Slight code adjustment, made 12 inputs (Too Fast))
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
We looked into it and found that it is caused by <div align="center">. We have posted a new build that addressed this issue. Please see your private message for the download location.
The new build also addressed the ClientFileName issue.
Thanks
|
|