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

Notification

Icon
Error

Options
Go to last post Go to first unread
andreym  
#1 Posted : Sunday, July 18, 2010 7:23:56 PM(UTC)
andreym

Rank: Advanced Member

Groups:
Joined: 6/16/2009(UTC)
Posts: 134

Was thanked: 8 time(s) in 8 post(s)
Hello!

First of all need to clarify what is this post about. This post is about how to save uploaded files in Classic ASP. It is not related to the ASP.NET and if you are using ASP.NET you should use ASP.NET control for Image Uploader Flash.

If you want to use Classic ASP to save uploaded images you may look at the attached sample. There are two classes clsUpload and clsField which parse request from Image Uploader Flash and provide methods to save uploaded files.
This is sample code how to save a file:
Code:
' Instantiate Upload Class
Set objUpload = New clsUpload
' Save source file
strPath = Server.MapPath(strFileName)
objUpload("File0_0").SaveAs strPath

Edited by user Sunday, October 17, 2010 8:48:23 PM(UTC)  | Reason: Not specified

File Attachment(s):
asp.zip (453kb) downloaded 316 time(s).
jhemps  
#2 Posted : Wednesday, August 25, 2010 11:52:07 PM(UTC)
jhemps

Rank: Newbie

Groups: Member
Joined: 8/19/2010(UTC)
Posts: 3

Is it possible to use Image Uploader Flash with the Persits ASPUpload component instead of the clsUpload & clsField clases in this example?

I've tried to handle the upload using the ASPUpload component put the Files collection is always blank?
Dmitry  
#3 Posted : Thursday, August 26, 2010 11:53:57 AM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

No, unfortunately the Persists component cannot parse requests sent by Image Uploader Flash.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
jhemps  
#4 Posted : Thursday, August 26, 2010 7:25:35 PM(UTC)
jhemps

Rank: Newbie

Groups: Member
Joined: 8/19/2010(UTC)
Posts: 3

Hi Dmitry,

Image Uploader Flash and Image Uploader Standard are both supposed to send files using standard HTTP POST request in a multipart/form-data format described by RFC 1867.

So why can ASPUpload be used to handle files sent with Image Uploader Standard, but not with files sent with Image Uploader Flash?
Dmitry  
#5 Posted : Friday, August 27, 2010 10:20:37 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

There is the limitation of the Adobe Flash platform. It does not permit sending files in requests prepared in a memory buffer. However, if sending thumbnails is enabled in Image Uploader Flash, the internal architecture requires building up HTTP POST requests in memory. This way we have to use the workaround: send files as binary data rather than as files, that is why attribute “filename” is named “filename_”. Because of this fact ASPUpload does not recognize received files as files and does not populate the collection holding all uploaded files.

We have server-side adapters for ASP.NET and PHP which pre-process requests and rename “filename_” to “filename” after that the request is parsed correctly on the server side. Unfortunately we have no implementation of this adapter for ASP.

Edited by user Friday, August 27, 2010 10:21:25 PM(UTC)  | Reason: Not specified

Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
thanks 1 user thanked Dmitry for this useful post.
conorhannah on 11/9/2010(UTC)
rdodd  
#6 Posted : Thursday, April 21, 2011 1:13:27 PM(UTC)
rdodd

Rank: Member

Groups: Member
Joined: 10/14/2005(UTC)
Posts: 6


In the interests of helping other folks, we ran into the following issue using this sample on IIS6. We were getting the error:
File: /clsUpload.asp
Description: Operation not Allowed
Line: 85

The default configuration for IIS6 has a limit of 200K for classic ASP. This can be configured via a metabase setting, you can see the following articles for more information:
http://jadendreamer.word...d-operation-not-allowed/
and
http://www.microsoft.com...46c270d357.mspx?mfr=true

Increasing this limit to be in line with what you have Aurigma configured for resolved the above error for us.
Robert
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.