View Full Version : Attachments not uploading.
F.B. ten Kate
02-20-2008, 09:30 AM
Im running on a Windows Server 2003 R2 with IIS and everything is working wonderfully. Now i'm trying to get attachments working and i've done this by making a "files" directory in the "scp" directory.
Put the settings so that it's writeable and things and indeed the admin panel accepts "files" as the right directory.
How ever when a ticket is made nothing is uploaded into this folder, or put in the database for that matter. Am i missing something completly? Or is this a functionality that hasn't been tested on a Windows server? As far as i can tell the directory is setup correctly (everyone and their pets can write/read/execute atm ^^)
I hope some one here can help me get this to work.
Greetings,
F.B. ten Kate
How did you specify the path? Because you should enter the complete path.
F.B. ten Kate
02-21-2008, 03:38 AM
atm it's done as: "files"
I tried before with: "D:\Support\scp\files" Which it accepts but then turns into..
D:supportscpfiles
Prolly because the "\"'s aren't beeing escaped.
So i tried with manually escaping the "\" so the path became: "D:\\support\\scp\\files"
All without result so far.
dbullard
02-21-2008, 04:45 PM
I have windows 2003 server also and the attachments wont upload, without any error at all and the path also goes all weird as mentioned..basically the exact same thing and my permissions i did adjust because when they werent i would get a non writable folder error...now just nothing !!!
is someone aware how to fix this
dbullard
02-21-2008, 05:15 PM
now as admin or staff we can post reply and add files but not opening a ticket it doesnt work
F.B. ten Kate
02-22-2008, 05:35 AM
We've made some headway,
First off all there is a bug in the current release of ostickets that doesn NOT escape the directory structure.
That means that whatever it gets from the database will be displayed without any "\"'s. So when you change your settings afterwards youll ALWAYS have to change your directory. This also means that you need to safe it in the database with 2x \\.
It's important to realise that it DOES escape the directory while safing, so in out case it turned out to be: D:\\support\\scp\\files. It will display as D:\support\\scp\\files but if you check the Database it will have double slashes everywhere.
Now if you do this your clients can upload. The problem i had, god knows why... I have a 2mb size .doc (file limit is set to 10048576) it doesnt give an error but it doesn't upload anything either. When this morning i tried some other files (just for the heck of it) it all of a sudden worked with the following configuration!!!!.
Then there is another bug:
the extensions are case sensitive, this means youll have to define: .txt and .TXT in order to allow both, a little script to turn the extention into lowercase before checking would solve this. (i aint a PHP guru, haven't code in it in AGES so can't just whip one up... in C# it would just be StringName.ToLower(); but i gues in PHP it requires a bit more ;)).
Now i still have the following "bug" it won't mail the attachments i upload as an admin, but i haven't looked into this yet. So ill spend some time on this but maybe some one knows this.
EDIT: Just tested some email shizzle, and it WILL send the attachments to a gmail account, but not internally. It might be our ISA or Spamm Filter acting up. So i can live with this, since i wont be mailing myself attachments anyway ^^
Anyhoe this should fix things for you dbullard! ^^