Rank: Newbie
Groups: Member
Joined: 1/7/2008(UTC) Posts: 1
|
I have some troubles to use java version of ImageUploader 5.5 with IE 6 & 7. I didn't bought activeX licence. Some times image uploader is ok and other times I have this error: Image Uploader ActiveX control is necessary to upload your files quickly and easily. You will be able to select multiple images in user-friendly interface instead of clumsy input fields with Browse button. Installation will take up to few minutes, please be patient. To install Image Uploader, please click on the Information Bar and select Install ActiveX Control from the dropdown menu. After page reload click Install when you see the control installation dialog.NOTE: If control fails to be installed, it may mean that it has been inserted to the page incorrectly. Refer Image Uploader documentation for more details If someone could help me and say me what I must do, I found no help on online doc. Thanks Edited by user Wednesday, September 17, 2008 1:01:42 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,659
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
|
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 9/22/2008(UTC) Posts: 39
|
I followed the instructions on the post referenced, and I now get the Java uploader to show up in IE 7. But when I click a thumbnail and hit "add", the bottom pane shows me the: Image Uploader ActiveX control is necessary to upload your files quickly and easily. You will be able to select multiple images in user-friendly interface instead of clumsy input fields with Browse button. Installation will take up to few minutes, please be patient. To install Image Uploader, please click on the Information Bar and select Install ActiveX Control from the dropdown menu. After page reload click Install when you see the control installation dialog. next to the Title, and Description fields. If it's working for the top half then why not the bottom half?
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,659
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
Quote:I followed the instructions on the post referenced, and I now get the Java uploader to show up in IE 7. But when I click a thumbnail and hit "add", the bottom pane shows me the: Image Uploader ActiveX control is necessary to upload your files quickly and easily. You will be able to select multiple images in user-friendly interface instead of clumsy input fields with Browse button. Installation will take up to few minutes, please be patient. To install Image Uploader, please click on the Information Bar and select Install ActiveX Control from the dropdown menu. After page reload click Install when you see the control installation dialog. next to the Title, and Description fields. If it's working for the top half then why not the bottom half? It seems you use MultipleDescriptions sample. Please open script.js and add: Code:function addUploadFileHtml(index){
var guid = "" + imageUploader1.getUploadFileGuid(index);
var fileName = "" + imageUploader1.getUploadFileName(index);
var h = "<table cellspacing=\"5\"><tbody>";
h += "<tr>";
h += "<td class=\"Thumbnail\" align=\"center\" valign=\"middle\">";
//Add thumbnail control and link it with Image Uploader by its name and GUID.
var tn = new ThumbnailWriter("Thumbnail" + uniqueId, 96, 96);
//Copy codebase and version settings from ImageUploaderWriter instance.
tn.activeXControlCodeBase = iu.activeXControlCodeBase;
tn.activeXControlVersion = iu.activeXControlVersion;
tn.javaAppletCodeBase = iu.javaAppletCodeBase;
tn.javaAppletCached = iu.javaAppletCached;
tn.javaAppletVersion = iu.javaAppletVersion;
//NEW CODE
tn.activeXControlEnabled = iu.activeXControlEnabled ;
tn.javaAppletEnabled = iu.javaAppletEnabled ;
//END NEW CODE
tn.addParam("ParentControlName", "ImageUploader1");
tn.addParam("Guid", guid);
tn.addParam("FileName", fileName);
h += tn.getHtml();
Edited by user Friday, October 3, 2008 5:32:30 AM(UTC)
| Reason: Not specified |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 9/22/2008(UTC) Posts: 39
|
Getting closer. Now, in IE I get a square shaped box but no thumbnail picture...just the border outline
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 9/22/2008(UTC) Posts: 39
|
In addition, as I try to upload a file, I get a "server side error" and it's an error stating "Object reference not set to an instance of an object" Here's the java console dump Code: <b> Exception Details: </b>System.NullReferenceException: Object reference not set to an instance of an object.<br><br>
<b>Source Error:</b> <br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>
Line 31: Dim sourceFile As HttpPostedFile = Request.Files("SourceFile_1")
Line 32:
<font color=red>Line 33: Dim fileName As String = GetSafeFileName(sourceFile.FileName)
</font>Line 34: sourceFile.SaveAs(Server.MapPath(galleryPath & fileName))
Line 35: </pre></code>
</td>
</tr>
</table>
<br>
<b> Source File: </b> C:\Inetpub\wwwroot_i\admin\imagegallery\uploader\upload.aspx<b> Line: </b> 33
<br><br>
<b>Stack Trace:</b> <br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>
[NullReferenceException: Object reference not set to an instance of an object.]
ASP.upload_aspx.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot_i\admin\imagegallery\uploader\upload.aspx:33
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
</pre></code>
And the actual code that is being referred to above looks like this: Code:<%@ Page Language="VB" AutoEventWireup="false" Debug="true" ValidateRequest="false" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Xml" %>
<script runat="server">
'This variable specifies relative path to the folder, where the gallery with uploaded files is located.
'Do not forget about the slash in the end of the folder name.
Private galleryPath As String = "/imagegallery/images/" & Format(DateTime.Today, "MM_dd_yyyy") & "/"
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Get the source file and save it to disk.
Dim sourceFile As HttpPostedFile = Request.Files("SourceFile_1")
Dim fileName As String = GetSafeFileName(sourceFile.FileName)
sourceFile.SaveAs(Server.MapPath(galleryPath & fileName))
Dim thumbnail1File As HttpPostedFile = Request.Files("Thumbnail1_1")
thumbnail1File.SaveAs(Server.MapPath(galleryPath & "large/" & fileName & ".jpg"))
End Sub
'This method verifies whether file with such name already exists
'and if so, construct safe filename name (to avoid collision).
Private Function GetSafeFileName(ByVal fileName As String) As String
Dim newFileName As String = fileName
Dim j As Integer = 1
While (File.Exists(Server.MapPath(galleryPath & newFileName)))
newFileName = j & "_" & fileName
j += 1
End While
Return newFileName
End Function
</script>
Edited by user Friday, October 3, 2008 5:31:27 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,659
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
Quote:In addition, as I try to upload a file, I get a "server side error" and it's an error stating "Object reference not set to an instance of an object" Quote: Getting closer. Now, in IE I get a square shaped box but no thumbnail picture...just the border outline Could you submit case or post here the URL or source code of page with Image Uploader? |
Best regards, Fedor Skvortsov
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.