Aurigma Forums
»
Upload Suite
»
Discussions – ActiveX/Java Uploader
»
How to upload image without using graphical interface?
Rank: Member
Groups: Member
Joined: 6/8/2004(UTC) Posts: 10
|
I want to upload image without using ImageUploader2 graphical interface. HTML page will have only input file tag and second asp page will create Server.CreateObject to insert file in ImageUpload2 component. After that I will proceed with standard asp code to make upload.
Question is: Is there any sample code to do this?
We use same component on other pages on web site but with graphical interface for upload and we are very satisfied with ImegeUpload2 component and we do not want to use other components.
Please help and advice.
Best Regards,
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
First of all, due security reasons Image Uploader does not allow managing upload file list from scripts, so it is impossible to use it in such manner. However could you describe more detailed why you need to use Image Uploader if you need not user interface? Why not to use common input fields?
If you also need thumbnails you could generate them on server side...
|
|
|
|
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)
|
There is a workaround allowing to make Image Uploader looking similar to input field:  You can do it with following code: Code:<html>
<body>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<object type="application/x-oleobject"
classid="clsid:FD18DD5E-B398-452A-B22A-B54636BA9F0D" width="200" height="23"
CodeBase="ImageUploader2.cab" id="ImageUploader" name="ImageUploader" VIEWASTEXT>
<param name="Layout" value="OnePane">
<param name="UploadView" value="List">
<param name="AllowMultipleSelection" value="False">
<param name="ShowDebugWindow" value="True">
<param name="ShowContextMenu" value="False">
<param name="EnableRotate" value="False">
<param name="ShowStatusPane" value="False">
<param name="ShowButtons" value="False">
<param name="Padding" value="0">
<param name="UploadThumbnail1FitMode" value="fit">
<param name="UploadThumbnail1Width" value="120">
<param name="UploadThumbnail1Height" value="120">
<param name="UploadThumbnail1JpegQuality" value="75">
<param name="Action" value="/imageuploader/asp/basicsample/abcupload.asp">
</object>
</td>
<td>
<input value="Browse..." onclick="ImageUploader.AddFiles();" type="button">
</td>
</tr>
</table>
</body>
</html>
Edited by user Monday, December 21, 2009 2:35:59 AM(UTC)
| Reason: Not specified Fedor attached the following image(s): |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Member
Groups: Member
Joined: 6/8/2004(UTC) Posts: 10
|
Hi Fedor
This code doesn't work. I receive error "Object doesn't support this property or method" This happens when I click on Browse button ( onclick="ImageUploader.AddFiles();" ) There is no AddFiles() method or internet explorer and Visual Studio .Net can not see this method.
Did you check this code when you submit it?
Please advise, I need this code to make single file upload and to make thumnails files.
Best regards
|
|
|
|
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)
|
>>This happens when I click on Browse button ( onclick="ImageUploader.AddFiles();" )
Please download last version of Image Uploader. The method "AddFiles" was added in version 2.5 only. |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Member
Groups: Member
Joined: 6/8/2004(UTC) Posts: 10
|
I try to make upload with code from this post form but still on 'ImageUploader.AddFile();' I get error "Object doesn't support this property or method"
I have ImageUploader 2.5
|
|
|
|
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)
|
You should use ImageUploader.AddFiles(); method. |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Member
Groups: Member
Joined: 6/8/2004(UTC) Posts: 10
|
Yes I use Files, I copy/paste your example.
Please help me I pass deadline with this project. First I have ImageUploader 2.0 and I inastall 2.5 without uninstall 2.0 How I can chack what version I have at this moment? In Add Remove Programs I have 2.5 version.
My live depends on this code, please help me.
Best regards,
|
|
|
|
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)
|
|
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Member
Groups: Member
Joined: 6/8/2004(UTC) Posts: 10
|
I need full code sample to make thumbnails with single file upload.
regards,
|
|
|
|
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)
|
Sorry, do you mean server side scripts too? If yes, then what is your server platform? |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Member
Groups: Member
Joined: 6/8/2004(UTC) Posts: 10
|
I need full solution, server and client side sample source code but with sigle file (not graphical) image upload. I need this to make thumnails.
Please supply code.
Best regards,
|
|
|
|
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)
|
What is your server platform (PHP, ASP, ASP.NET, JSP, Perl, and so on)? |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Member
Groups: Member
Joined: 6/8/2004(UTC) Posts: 10
|
I work on Wndows XP development and server is Windows 2000 and Windows 2003 server
|
|
|
|
Rank: Member
Groups: Member
Joined: 6/8/2004(UTC) Posts: 10
|
|
|
|
|
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)
|
To run this sample in it you need replace default.asp file in Basic Sample from evaluation package. default.aspCode:<%
'*********************************************************************************
' Aurigma Image Uploader 2.0 Sample Script
' Copyright(c) Aurigma Inc. 2002-2004
' WWW: http://www.aurigma.com
'*********************************************************************************
%>
<html>
<head>
<title>Aurigma Image Uploader 2</title>
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body bgcolor="#C3DAF9">
<table cellpadding="0" cellspacing="0" border="0">
<form ID="Form1" name="Form1">
<tr>
<td>
Author:
</td>
<td colspan="2">
<input type="text" name="Author" id="Author" value="Alex" size="43">
</td>
</tr>
</form>
<tr>
<td>Image:</td>
<td>
<object type="application/x-oleobject"
classid="clsid:FD18DD5E-B398-452A-B22A-B54636BA9F0D" width="200" height="23"
CodeBase="ImageUploader2.cab" id="ImageUploader" name="ImageUploader" VIEWASTEXT>
<param name="Layout" value="OnePane">
<param name="UploadView" value="List">
<param name="AllowMultipleSelection" value="False">
<param name="ShowDebugWindow" value="True">
<param name="AdditionalFormName" value="Form1">
<param name="ShowContextMenu" value="False">
<param name="EnableRotate" value="False">
<param name="ShowStatusPane" value="False">
<param name="ShowButtons" value="False">
<param name="Padding" value="0">
<param name="UploadThumbnail1FitMode" value="fit">
<param name="UploadThumbnail1Width" value="120">
<param name="UploadThumbnail1Height" value="120">
<param name="UploadThumbnail1JpegQuality" value="75">
<param name="Action" value="DundasUpload.asp">
<param name="RedirectUrl" value="PictureGallery.asp">
</object>
</td>
<td>
<input value="Browse..." onclick="ImageUploader.AddFiles();" type="button">
</td>
</tr>
<tr>
<td></td>
<td colspan="2"><input type="button" value="Upload" onclick="ImageUploader.Send();"></td>
</tr>
</table>
</body>
</html>
======================================================== 02/14/2008, Fedor This topic is out of date.
You should use iuembed.js syntax now:Code:<html>
<head>
<title>Aurigma Image Uploader</title>
<script type="text/javascript" src="iuembed.js"></script>
</head>
<body bgcolor="#C3DAF9">
<table cellpadding="0" cellspacing="0" border="0">
<form ID="Form1" name="Form1">
<tr>
<td>
Author:
</td>
<td colspan="2">
<input type="text" name="Author" id="Author", "Alex" size="43">
</td>
</tr>
</form>
<tr>
<td>Image:</td>
<td>
<script type="text/javascript">
//<![CDATA[
//Create JavaScript object that will embed Image Uploader to the page.
var iu = new ImageUploaderWriter("ImageUploader1", 250, 23);
iu.activeXControlCodeBase = "./ImageUploader5.cab";
iu.javaAppletJarFileName = "ImageUploader5.jar";
iu.javaAppletCodeBase = "./";
iu.addParam("paneLayout", "OnePane");
iu.addParam("UploadView", "List");
iu.addParam("AllowMultipleSelection", "False");
iu.addParam("ShowDebugWindow", "True");
iu.addParam("AdditionalFormName", "Form1");
iu.addParam("ShowContextMenu", "False");
iu.addParam("AllowRotate", "False");
iu.addParam("ShowStatusPane", "False");
iu.addParam("ShowButtons", "False");
iu.addParam("Padding", "0");
iu.addParam("UploadThumbnail1FitMode", "fit");
iu.addParam("UploadThumbnail1Width", "120");
iu.addParam("UploadThumbnail1Height", "120");
iu.addParam("UploadThumbnail1JpegQuality", "75");
iu.addParam("Action", "DundasUpload.asp");
iu.addParam("RedirectUrl", "PictureGallery.asp");
iu.writeHtml();
//]]>
</script>
</td>
<td>
<input value="Browse..." onclick="getImageUploader('ImageUploader1').AddFiles();" type="button">
</td>
</tr>
<tr>
<td></td>
<td colspan="2"><input type="button" value="Upload" onclick="getImageUploader('ImageUploader1').Send();"></td>
</tr>
</table>
</body>
</html>
========================================================Edited by user Wednesday, October 29, 2008 2:17:55 PM(UTC)
| Reason: Not specified |
Best regards, Fedor Skvortsov
|
|
|
|
Aurigma Forums
»
Upload Suite
»
Discussions – ActiveX/Java Uploader
»
How to upload image without using graphical interface?
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.