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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Mike's File Attachment Mod for Snitz
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 15

Michael Schmidt
Starting Member

23 Posts

Posted - 13 July 2002 :  19:42:16  Show Profile  Visit Michael Schmidt's Homepage  Send Michael Schmidt an AOL message  Send Michael Schmidt an ICQ Message  Send Michael Schmidt a Yahoo! Message
dayve, i think you're misusing the Right(string, int) function. for example

Right(".longextension",4) returns: "sion"

and

Right(".zip",4) returns: ".zip"

the only situation Right(extension,4) would return "." would be files with no extensions but which end with a period.

extension = LCase(Mid(filename,InStrRev(filename,".")))

always equals everything after and including the last period in the filename.

Also I do agree having a list of accepted file types would be better than a list of blocked file types for public servers. But for a trustworthy lan environment I perfer to have it as hinder-free as possible.

later!

Mike

Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 13 July 2002 :  20:36:31  Show Profile  Visit dayve's Homepage
quote:

dayve, i think you're misusing the Right(string, int) function. for example

Right(".longextension",4) returns: "sion"

and

Right(".zip",4) returns: ".zip"



LOL, I don't think you are reading my post clearly... I wrote...

if right(extension,4) <> "." then
response.write "sorry, only 3 letter extensions allowed"

I am NOT using this, I was just showing an example but it clearly shows that I am using it to enforce 3 character extensions ONLY as Etymon had asked:

Etymon asked "In the code, is there a way to add a wild card to an extension? For example, if I want to accept a three letter .jpg extension and nothing longer, how do I tell it to accept just only .jpg?"


quote:

But for a trustworthy lan environment I perfer to have it as hinder-free as possible.



I am a LAN administrator as well, but not sure what you mean by this? As a LAN administrator in charge of a FIREWALL you close ALL HOLES and punch ALLOWED holes.. this is the BEST approach and extremely hinder free once it is set up correctly.


http://www.nineinchnailz.com


Edited by - dayve on 13 July 2002 20:43:00
Go to Top of Page

Michael Schmidt
Starting Member

23 Posts

Posted - 14 July 2002 :  23:19:39  Show Profile  Visit Michael Schmidt's Homepage  Send Michael Schmidt an AOL message  Send Michael Schmidt an ICQ Message  Send Michael Schmidt a Yahoo! Message
if right(extension,4) <> "." then
response.write "sorry, only 3 letter extensions allowed"


this code does not enforce 3 letter extensions. I think what you meant to type was:

if Mid(Right(extension,4),1,1) <> "." Then
response.write "sorry, only 3 letter extensions allowed"

just trying to help etymon if he is still using this method.

Mike

Edited by - Michael Schmidt on 14 July 2002 23:35:05
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 14 July 2002 :  23:57:22  Show Profile  Visit dayve's Homepage
yes you are right mike on this, I forgot the mid part.

I am still not in agreement though with the allow/disallow routine though. I think it is best to disallow all and then enter in the code file types allowed.

btw, anyone wanting to use this asp upload in combination with individual member directories, here is the source code I am using:

http://dayve.d2g.com/forum/display_source.asp?page=pop_upload_new.asp

and

http://dayve.d2g.com/forum/display_source.asp?page=outputfile.asp

I am not autoinserting into the message because I am still using HuwR's version but you can easily comment out the line in outputfile.asp.


http://www.nineinchnailz.com

Edited by - dayve on 15 July 2002 00:02:28
Go to Top of Page

antracit
Starting Member

Sweden
33 Posts

Posted - 15 July 2002 :  07:34:30  Show Profile  Visit antracit's Homepage
Hi

First a big thanks to all developers at Snitz!!

My subject;
Just tried this asp upload with folder-creating. Works perfect!
I’m not to good with asp but have been using SnitzForums for a while.
Now I’m wondering if there is a way to combine this upload with a function where you assign members to be able or not able to upload these files. I think there would bee some adding to the database?

HuwR's upload got something like that, where you turn on/off upload abilities at the Forum, but not depending on membership (I think).


JS

Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 15 July 2002 :  13:21:41  Show Profile  Visit dayve's Homepage
antracit, call me crazy but I am reinventing the wheel here. I have taken what Mike has found along with what HuwR has developed in the past and will be implementing features like the one you just mentioned. So far on my to do list is:

1. Control Panel for filtering file types and sizes.
2. Member control for allowable uploads and downloads.

For the record I have been able to use HuwR's upload mod on 3.3 and it works just fine so instead of using this version, you may want to use HuwR's which encapsulates all the features you are probably looking for. I am just tweaking this one because its fun to go through all the hurdles of taking "base" code and slowly customizing it to integrate nicely with Snitz. Call me crazy.. but it is fun


http://www.nineinchnailz.com
Go to Top of Page

XavierSlater
Junior Member

United Kingdom
137 Posts

Posted - 15 July 2002 :  13:40:53  Show Profile  Visit XavierSlater's Homepage
Dayve, yer crazy.

There you go, dutifully obliged...

What I would be interested in is an amalgam of the File upload, and the User Groups mod, so you could assign rights to groups, and folders to groups and such like.

Thoughts?

Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 15 July 2002 :  17:04:24  Show Profile  Visit dayve's Homepage
I am not using the User Groups Mod (didn't even know there was one completed) but that is a good idea. I will keep the idea written down but will concentrate the basics of the mod first. I have found a bug with this script that also exists in HuwR's mod that allows ANYONE to upload images into and over existing files in other members directories. I have fixed that in this version as well as HuwR's version and will email HuwR to see if he is aware of it.


http://www.nineinchnailz.com
Go to Top of Page

XavierSlater
Junior Member

United Kingdom
137 Posts

Posted - 15 July 2002 :  17:07:55  Show Profile  Visit XavierSlater's Homepage
Been exchanging mails with Morpheus73 today on the usergroups MOD, its bee shelved for the meantime, he has a work in progress that is quite spanky.

I am running one of the alpha versions on a site, but I want to expand it beyond controlling forum access, and using it to backbone some content delivery systems.

Sadly I am all ideas, and no skillset atm.

The file library thing, with a Usergroup model controlling access would make a HUGE difference to a project I am currently working on, or been tasked with.

Regards,

Stuart

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 15 July 2002 :  17:08:49  Show Profile
dayve, are those changes in the files you have posted a link to above?
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 16 July 2002 :  22:39:14  Show Profile  Visit dayve's Homepage
quote:

dayve, are those changes in the files you have posted a link to above?



I believe so. the issue with uploadengine.asp is this line

strFolder = objUpload.Form.Item("Folder")

I have changed it to

strFolder = strDBNTUsername

and I did something similar to the files for this mod in outputfile.asp, you'll see it in the source. let me know if you have any questions... I have a friend that had some issues using the objUpload.Form.Item.

here is my uploadengine.asp

http://dayve.d2g.com/forum/display_source.asp?page=uploadengine.asp




http://www.nineinchnailz.com

Edited by - dayve on 16 July 2002 22:51:10
Go to Top of Page

ve3sjk
Starting Member

3 Posts

Posted - 17 July 2002 :  12:37:35  Show Profile
I uploaded and installed the files as per instructions, when I go to the file upload in the forums on my server and give it a file name and press upload I get an internal server error 500.



Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 17 July 2002 :  14:37:52  Show Profile  Visit dayve's Homepage
quote:

I uploaded and installed the files as per instructions, when I go to the file upload in the forums on my server and give it a file name and press upload I get an internal server error 500.







you need to give WRITE permissions to the uploaded directory and make it inheritable


http://www.nineinchnailz.com
Go to Top of Page

ve3sjk
Starting Member

3 Posts

Posted - 17 July 2002 :  17:00:22  Show Profile
Got it working, works great.....kudos to the writers.....

Here is a question,

how hard would it be to create a log file of the users ip address when a file is downloaded. What I have is a private forum that only certain user can access, I guess I'am looking for a way of knowing if a user gives his access to someone else(ie different ip). Almost like an ip based security that only allows a user to access the download from the ip address he used to register to the forum.

Thanks,
Steve

Go to Top of Page

burthold
Junior Member

USA
426 Posts

Posted - 23 July 2002 :  20:13:44  Show Profile  Visit burthold's Homepage
In my photo album I regulate uploads to just jpegs I do this by looking at the file ext and the file type sent from the browser i.e. image/pjpeg. I tried to rename files to diffrent ext i.e. zip files to jpg gif to jpg etc etc and it seems to catch them and kick them back every time. I also have file size limits that are admin controled. I may put in an option to choose what kind of image files are allowed. I chose jpg because it is usually the smaller and most distributed of image types.

Wes

Go to Top of Page
Page: of 15 Previous Topic Topic Next Topic  
Previous Page | Next Page
 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.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07