Welcome Guest Search | Active Topics

Add Reply New Topic

error uploading more than 1 photo

Options
BrAiNumbc
Posted: Monday, March 22, 2004 9:23:00 AM
Rank: Member
Groups: Member

Joined: 2/12/2004
Posts: 16
Points: 0
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:

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

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?
Andrew
Posted: Monday, March 22, 2004 9:52:00 PM
Andrew's avatar
Rank: Advanced Member
Groups: Administration , Member

Joined: 8/2/2003
Posts: 715
Points: 126
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.

Sincerely yours,
Andrew Simontsev from Aurigma Team
BrAiNumbc
Posted: Tuesday, March 23, 2004 8:39:00 AM
Rank: Member
Groups: Member

Joined: 2/12/2004
Posts: 16
Points: 0
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
Posted: Tuesday, March 23, 2004 9:35:00 AM
Rank: Member
Groups: Member

Joined: 2/12/2004
Posts: 16
Points: 0
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
Posted: Tuesday, March 23, 2004 8:28:00 PM
Andrew's avatar
Rank: Advanced Member
Groups: Administration , Member

Joined: 8/2/2003
Posts: 715
Points: 126
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:

<%
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).

Sincerely yours,
Andrew Simontsev from Aurigma Team
BrAiNumbc
Posted: Wednesday, March 24, 2004 8:24:00 AM
Rank: Member
Groups: Member

Joined: 2/12/2004
Posts: 16
Points: 0
In shrinking the file, does it actually decrease the file size as well?
Andrew
Posted: Wednesday, March 24, 2004 8:05:00 PM
Andrew's avatar
Rank: Advanced Member
Groups: Administration , Member

Joined: 8/2/2003
Posts: 715
Points: 126
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.

Sincerely yours,
Andrew Simontsev from Aurigma Team
BrAiNumbc
Posted: Thursday, March 25, 2004 9:23:00 AM
Rank: Member
Groups: Member

Joined: 2/12/2004
Posts: 16
Points: 0
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
Posted: Thursday, March 25, 2004 8:53:00 PM
Andrew's avatar
Rank: Advanced Member
Groups: Administration , Member

Joined: 8/2/2003
Posts: 715
Points: 126
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.

Sincerely yours,
Andrew Simontsev from Aurigma Team
Chaitalee
Posted: Sunday, April 04, 2004 10:14:00 PM
Rank: Member
Groups: Member

Joined: 4/4/2004
Posts: 2
Points: 0
I was having same problem. And I tried solution given by you and it worked.
Thx. Andrew. :)
Chaitalee
Posted: Sunday, April 04, 2004 10:18:00 PM
Rank: Member
Groups: Member

Joined: 4/4/2004
Posts: 2
Points: 0
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
Posted: Monday, April 05, 2004 5:57:00 AM
Andrew's avatar
Rank: Advanced Member
Groups: Administration , Member

Joined: 8/2/2003
Posts: 715
Points: 126
Glad to help you. If you experience any other problems, please feel free to contact us (at this forum or submit case)

Sincerely yours,
Andrew Simontsev from Aurigma Team
Users browsing this topic
Guest

Add Reply New 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.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Yet Another Forum.net version 1.9.1.6 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.