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

Notification

Icon
Error

Options
Go to last post Go to first unread
BrAiNumbc  
#1 Posted : Monday, March 22, 2004 1:23:00 AM(UTC)
BrAiNumbc

Rank: Member

Groups: Member
Joined: 2/12/2004(UTC)
Posts: 24

Was thanked: 1 time(s) in 1 post(s)
On some Win98 machines (with IE6.0), I've noticed a problem that users are having uploading pics. If they upload one at a time, everything works fine. However, once they attempt to upload multiple photos in a single upload, my upload sceipr errors out on the .Upload line of the following asp script I have running:

Code:
Dim strGalleryPath, strConnectionString, MyConnection
strGalleryPath = "/asp/uploads/photos/"
Dim objUpload
Dim intFileCount, I 
Dim strAuthor  
        Set objUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
objUpload.Upload  'ERROR OCCURS HERE



Thi is the error I get

Code:
Request object error 'ASP 0104: 80004005'
Operation not Allowed
/asp/Upload.asp, line 24 (This is that last line I posted above)


Does anyone have any idea why some users might be getting this error when uploading more than one photo?

Edited by user Monday, December 24, 2007 6:07:33 PM(UTC)  | Reason: Not specified

Andrew  
#2 Posted : Monday, March 22, 2004 1:52:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 866

Thanks: 2 times
Was thanked: 26 time(s) in 26 post(s)
Are you on Windows 2003? It is likely you have limitation of max upload size in IIS settings. Try the solution described in aspSmartUpload FAQ.
BrAiNumbc  
#3 Posted : Tuesday, March 23, 2004 12:39:00 AM(UTC)
BrAiNumbc

Rank: Member

Groups: Member
Joined: 2/12/2004(UTC)
Posts: 24

Was thanked: 1 time(s) in 1 post(s)
Actually, yes I am running my web server on Win2003. I read the faq and read the follwing:


Open your metaname.XML which is located in c:\Windows\System32\Inetsrv find the line "AspMaxRequestEntityAllowed" and change it to "1073741824".
You might need to start windows in Safe-mode to be able to change that file, otherwise it's being used by IIS.

Actually first off, the name of this file that contains this value on my server is MBSchema.xml. .. just FYI
But anyways... that number "1073741824". Is this some kind of code.. or is that a byte value (around 1 gig correct?)
BrAiNumbc  
#4 Posted : Tuesday, March 23, 2004 1:35:00 AM(UTC)
BrAiNumbc

Rank: Member

Groups: Member
Joined: 2/12/2004(UTC)
Posts: 24

Was thanked: 1 time(s) in 1 post(s)
Yup. That was the culprit alright. Problem solved.

I have on other question which may or may not be in your jurisdiction. The reason this was a problem is that I am having people upload to our site, photos they have taken with their digital cameras. I'm trying to make this upoad process as easy for the computer-illiterate person as possible, and I know most people aren't going to know how to reduce the size/dimensions of their photos/files before they upload.

You wouldn't happen to know of any example asp scripts which take the uploaded files, and reduce their sizes or dimensions before saving them to a location on the server, would you? Depending upon the digital cameras that people are using, they could have photos randing anywhere from 50k in size to 50 megs!


Any help appreciated ;)

Brian
Andrew  
#5 Posted : Tuesday, March 23, 2004 12:28:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 866

Thanks: 2 times
Was thanked: 26 time(s) in 26 post(s)
If you need to process uploaded images on server side in ASP script, you should use special ActiveX component for it. In particular we have an imaging component Graphics Mill.

The code with Graphics Mill will be approximately the following:

Code:
<%
Dim objUpload
Dim objBitmap
Dim objFile

Set objUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
objUpload.Upload

Set objBitmap = Server.CreateObject("GraphicsMill.Bitmap")

Dim I, intFileCount
Dim strFilename

intFileCount = objUpload.Form("ImageCount").Values
For I=0 To intFileCount 
  Set objFile = objUpload.Files("Image" & I)
  strFilename = Server.MapPath("Gallery/" & objFile.FileName)
  objFile.SaveAs strFilename

  objBitmap.LoadFromFile strFilename
  objBitmap.Transforms.Resize 640     ' width 640, height is calculated to save aspect 
  objBitmap.SaveToFile strFilename

  'Much more fast, but less quality alternative:
  'objBitmap.LoadThumbnailFromFile strFilename, 640
  'objBitmap.SaveToFile strFilename 
Next
%>


Besides, you can resize the original files on client side (using Image Uploader), however in this case you will loose additional information in the JPEG file (EXIF data).

Edited by user Wednesday, February 13, 2008 6:10:05 PM(UTC)  | Reason: Not specified

BrAiNumbc  
#6 Posted : Wednesday, March 24, 2004 12:24:00 AM(UTC)
BrAiNumbc

Rank: Member

Groups: Member
Joined: 2/12/2004(UTC)
Posts: 24

Was thanked: 1 time(s) in 1 post(s)
In shrinking the file, does it actually decrease the file size as well?
Andrew  
#7 Posted : Wednesday, March 24, 2004 12:05:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 866

Thanks: 2 times
Was thanked: 26 time(s) in 26 post(s)
Yes, sure. When you deal with JPEG files two things influence on file size: image dimensions and JPEG quality. So to reduce file size you can either make the image smaller or decrease JPEG quality.
BrAiNumbc  
#8 Posted : Thursday, March 25, 2004 1:23:00 AM(UTC)
BrAiNumbc

Rank: Member

Groups: Member
Joined: 2/12/2004(UTC)
Posts: 24

Was thanked: 1 time(s) in 1 post(s)
I guess I need to learn a little more about graphics. What is EXIF data? If this is lost, will it cause problems with trying to view the jpg's later?
Andrew  
#9 Posted : Thursday, March 25, 2004 12:53:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 866

Thanks: 2 times
Was thanked: 26 time(s) in 26 post(s)
EXIF data is an additional information about photo provided by digital cameras. Depending on camera model, it may include camera name, shot parameters (focal length, ISO, exposure, flash, etc), photo orientation, date and time of shot, and so on. It does not influence on the image itself, so no problem with viewing JPEG which does not contain such data arise. But if this data is essential to you, you should also have an original image.
Chaitalee  
#10 Posted : Sunday, April 04, 2004 2:14:00 PM(UTC)
Chaitalee

Rank: Member

Groups: Member
Joined: 4/4/2004(UTC)
Posts: 2

I was having same problem. And I tried solution given by you and it worked.
Thx. Andrew. :)
Chaitalee  
#11 Posted : Sunday, April 04, 2004 2:18:00 PM(UTC)
Chaitalee

Rank: Member

Groups: Member
Joined: 4/4/2004(UTC)
Posts: 2

I was having same problem. I have windows 2003. I tried solution given by you and it worked.

Thx. Andrew. :)

Thanks & Regards,
Chaitalee Singh.
Andrew  
#12 Posted : Sunday, April 04, 2004 9:57:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 866

Thanks: 2 times
Was thanked: 26 time(s) in 26 post(s)
Glad to help you. If you experience any other problems, please feel free to contact us (at this forum or submit case)

Edited by user Friday, May 23, 2008 4:13:00 PM(UTC)  | Reason: Not specified

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.