Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 File Attachment: How to allow certain files
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

padawan
Junior Member

200 Posts

Posted - 15 January 2004 :  09:44:55  Show Profile
Snitz peers:

I'm a bit stomped. How (and where) do I change the OUTPUT.ASP file so that my forum can receive .DOCs (that may go beyond 5MB) and .PDF files? Here's the script section I'm butting my head against.

--------------------------------------------------------------------
' --- CHECK FILE FOR ACCEPTABILITY ---
if oldfilename = "" then
response.redirect "pop_upload_new.asp"
else
extension = LCase(Mid(filename,InStrRev(filename,".")))
end if

select case extension
case ".jpg", ".jpeg", ".gif", ".zip", ".doc", ".txt"
allowFile=true
case else
allowFile=false
end select

If allowFile and byteCount <= 250000 Then
value = UploadRequest.Item("blob").Item("Value")

...
...

--------------------------------
Any input is greatly appreciated.



Padawan

"...be mindful of the SnitzForce..."

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 15 January 2004 :  09:53:47  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
The code you've posted already allows upload of DOC files.

To allow PDF upload, change the following line:
case ".jpg", ".jpeg", ".gif", ".zip", ".doc", ".txt"

to
case ".jpg", ".jpeg", ".gif", ".zip", ".doc", ".txt", ".pdf"


You can set the allowed maximum size of a file in the following line:
If allowFile and byteCount <= 250000 Then

Simply replace the blue value to your desired maximum size in bytes.

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz

Edited by - OneWayMule on 15 January 2004 09:54:17
Go to Top of Page

padawan
Junior Member

200 Posts

Posted - 15 January 2004 :  09:58:50  Show Profile
quote:
Originally posted by OneWayMule

The code you've posted already allows upload of DOC files.

To allow PDF upload, change the following line:
case ".jpg", ".jpeg", ".gif", ".zip", ".doc", ".txt"

to
case ".jpg", ".jpeg", ".gif", ".zip", ".doc", ".txt", ".pdf"


You can set the allowed maximum size of a file in the following line:
If allowFile and byteCount <= 250000 Then

Simply replace the blue value to your desired maximum size in bytes.



Thanks, mr. eeyore... I'll try to do as you suggest. Perhaps, I didn't increase the file size, enough for the system to allow the upload.

cheers!



padawan

"...be mindful of the SnitzForce..."
Go to Top of Page

padawan
Junior Member

200 Posts

Posted - 15 January 2004 :  10:31:30  Show Profile
I think I know where my problem is...

The code above is for the "File Lister" component (SH modded). The one I'm trying to use is the "Attach File" (with paperclip icon) feature associated with a create or reply to new topic.

Question:

How do I change the "attach a file" component to accept the files I want for users to be able to attach, and, what ASP file do I need to edit?

whew!

padawan

"...be mindful of the SnitzForce..."
Go to Top of Page

proeder
Junior Member

Australia
230 Posts

Posted - 10 February 2004 :  20:31:53  Show Profile  Visit proeder's Homepage
Look here to allow certain file types:

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=51110

...much easier!

Looking for german Snitz forum? Suchst Du ein deutsches Snitz Forum?
Hier findest Du eins...

Hosting with ASP Support available: http://www.sharepointing.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07