Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
Al-B  
#1 Posted : Monday, July 19, 2004 11:10:00 PM(UTC)
Al-B

Rank: Member

Groups: Member
Joined: 7/19/2004(UTC)
Posts: 1

Hi all,
I've download the trial of the image uploader with hopes that it will fill a need I have for an online content managment tool I am developing. I have had good luck with it so far but I have a snag now.

I have a pre-determined list of image filenames that I extract from an uploaded XML file. These are names of images that the user is required to upload. What I am trying to do is list the required image names on the page and as the user selects a file to upload, check to see if it matches one of the required files. If so I'll check it off the list. What I can't figure out is a way to get the filename of the seleted image when it is checked. Is this possible? Obviously the size of the file is readable to fire a javscript event for that updates total file size bar.

This is a fairly urgent problem and may determine if the image uploader is right for needs. Any help is greatly appreciated.

Regards,
Al
Fedor  
#2 Posted : Tuesday, July 20, 2004 10:19:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
I have a pre-determined list of image filenames that I extract from an uploaded XML file. These are names of images that the user is required to upload. What I am trying to do is list the required image names on the page and as the user selects a file to upload, check to see if it matches one of the required files. If so I'll check it off the list. What I can't figure out is a way to get the filename of the seleted image when it is checked. Is this possible? Obviously the size of the file is readable to fire a javscript event for that updates total file size bar.

We haven't implement retreiving file names for security reasons. It is possible to implement it as custom work. If you are interested in it please contact with us at sales@aurigma.com.

Edited by user Friday, May 23, 2008 3:55:04 PM(UTC)  | Reason: Not specified

Best regards,
Fedor Skvortsov
Fedor  
#3 Posted : Thursday, August 26, 2004 6:49:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Here is sample how you can do it:

Code:
<!--
'*********************************************************************************
' Aurigma Image Uploader 3.x Sample Script
' Copyright(c) Aurigma Inc. 2002-2004
' WWW: http://www.aurigma.com
'*********************************************************************************
-->
<html>
<head>
	<title>Aurigma Image Uploader 3.x</title>
	<style>
select, button{
	font-size:11px;
}	
	</style>
	<script>
//Specify here files you need to be uploaded
var files = new Array("back.gif", "logo.gif", "screenshot.gif")

function showFileList(){
	//create associative array with file names
	var uploadFiles = new Object();
	for (i=1;i<=ImageUploader.UploadItems.Count;i++){
		var uploadItem = ImageUploader.UploadItems.Item(i);
		uploadFiles[uploadItem.fileName.split("\\").reverse()[0]]=1;	
	}
				
	var fileList = document.getElementById("fileList");
	
	//remove old options
	while (fileList.options.length>0){
		fileList.options.remove(0);
	}

	//add new options	
	for (i=0;i<files.length;i++){
		var fileName = files[i];
		if (uploadFiles[fileName]==undefined){
			var option = document.createElement("OPTION");
			fileList.options.add(option);
			option.innerText = fileName;
			option.value = fileName;
		}
	}
}

function uploadClick(){
	if (document.getElementById("fileList").options.length>0){
		alert("Please select all files specified in right list.");
	}
	else{
		ImageUploader.Send();
	}
}
	</script>
	<script for="ImageUploader" event="UploadFileCountChange">
showFileList();
	</script>		
</head>
<body bgcolor="#C3DAF9" onload="showFileList();">
	<table cellpadding="3" cellspacing="0" border="0" width="400">			
		<tr>
			<td>
				<button onclick="ImageUploader.AddFiles();">Add Files...</button>
			</td>
			<td align="right">
				<button onclick="ImageUploader.SelectAll();">Select All</button>
				<button onclick="ImageUploader.DeselectAll();">Deselect all</button>
				&nbsp;
				<button onclick="uploadClick();">Upload</button>								
			</td>
			<td>
			</td>
		</tr>			
		<tr>
			<td width="600" colspan="2">
				<object type="application/x-oleobject" 
					classid="clsid:A18962F6-E6ED-40B1-97C9-1FB36F38BFA8" width="400" height="305" 
					CodeBase="../ImageUploader3.cab" id="ImageUploader" name="ImageUploader" VIEWASTEXT>

					<param name="Layout" value="OnePane">

					<param name="UploadView" value="Details">
					
					<param name="ShowDebugWindow" value="True">
					<param name="ShowButtons" value="False">						
					<param name="EnableRotate" value="False">	

					<param name="Action" value="upload.asp">
					<param name="RedirectUrl" value="PictureGallery.asp">						

					<param name="Padding" value="0">						

				</object>					
			</td>			
			<td>
				<select id="fileList" multiple style="width:180px;height:305px;">
				
				</select>
			</td>
		</tr>
	</table>
</body>
</html>




========================================================
02/14/2008, Fedor
This topic is out of date.

You should use iuembed.js syntax now. If you need the working sample please let us know.


========================================================

Edited by user Wednesday, October 29, 2008 2:10:39 PM(UTC)  | Reason: Not specified

Best regards,
Fedor Skvortsov
Users browsing this topic
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.