|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have run into a situation here.
I paid for an extension in DMXzone and now found out that I can't use it, sh1t! All I wanted was to restrict the image dimensions (ie: 20x30 or 50x140) Since the extension can't do this anymore, what could I use instead? or what could I use in addition? Is there an upload script to set these restrictions? Is there a work around in IE7 or Firefox for this? Cheers |
|
#2
|
|||
|
|||
|
Anyone?
|
|
#3
|
||||
|
||||
|
I'd love to help, but I have absolutely no idea what you are talking about.
|
|
#4
|
|||
|
|||
|
There is a security issue in Firefox and IE7 that stops the upload script from seeing the image dimensions, ie: width, height and so on. (This is on the client side only)
All I need is a work around or a script that can do this. The idea I though of: Code:
upload.asp => A form used to upload the file checkimg.asp => Check the file dimensions - if happy upload else cancel or delete I have these: (can't get them to work together) Quote:
|
|
#5
|
|||
|
|||
|
Quote:
It's ASP fie upload? When you want to upload files to your webserver - images, PDF's and so on. |
|
#6
|
||||
|
||||
|
As I recall correctly, the browsers are prevented from examining the images to prevent malicious code from being inadvertently executed by said browser. This was a known issue with IE, I am unaware if Firefox had the same issue or if the same blocking was implemented as a preventative measure.
If I understand your problem correctly, you are working on a script to automate file upload to your web server and want to prevent the user from trying to upload images that are too large? Would it not be easier to have the server reject the images? |
|
#7
|
|||
|
|||
|
Yes, I am working on a script right now.
Just my if-then-else-end if is not so good. |
|
#8
|
||||
|
||||
|
Quote:
Why? Not elegant enough? |
|
#9
|
|||
|
|||
|
No,
The if then else part is not easy for me get right. I have this part that isn't working. Code:
if iWidth <= "300" then
response.write("Dimensions: " & iWidth & " x " & iHeight & "<br>")
response.write("Image Type: " & iType & "<br>")
else
' This is where we delete the file!
response.write("Problem:"&"<br>"&"Dimensions are not correct."&"<br>")
response.write("Image deleted"&"<br>")
end if
That part I can't get right, it may even be the image checking part that's the problem. Last edited by student101 : February 29th, 2008 at 08:14 AM. |
|
#10
|
|||
|
|||
|
Cool working now.
Change iWidth to integer. Thank you. |
|
#11
|
||||
|
||||
|
Funny how asking stupid questions can sometimes lead one to the answer.
|
![]() |
| Viewing: Codewalkers Forums > General > General Chat > IE7, Firefox(lastest) and ASP file uploads? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|