News:

Wondering if this will always be free?  See why free is better.

Main Menu

Large attachments and uploading psd's...

Started by MLM, May 07, 2011, 05:33:31 PM

Previous topic - Next topic

MLM

I am trying to attach a 80mb file to one of my threads on my forum but it does not work because my php config only allows 10mb and I can not manually add it/ ftp because I have no idea how to make a file_hash in the db.

My second problem is that I can never attach a psd no matter the size because this error pops:
Your attachment has failed security checks and cannot be uploaded. Please consult the forum administrator.


Is there any fixes to these problems?

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

ACAMS

A file that large will most likely need to be zipped and uploaded to your FTP server.
I have never been able to get mine past 32MB, but I zip, upload and link large files anyway.

MLM

#2
Quote from: ACAMS on May 07, 2011, 06:22:49 PM
A file that large will most likely need to be zipped and uploaded to your FTP server.
I have never been able to get mine past 32MB, but I zip, upload and link large files anyway.

The large file is zipped.

but any size psd just gives me an error when i try to upload even on this site..

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

ACAMS

Since host are different, ask your host how to increase your max upload size.....or do a google search, but it is usually complicated and sometimes requires Putty. I did mine with a custom php.ini, but it is limited to 32MB on my server.

MLM

Quote from: ACAMS on May 07, 2011, 08:20:57 PM
Since host are different, ask your host how to increase your max upload size.....or do a google search, but it is usually complicated and sometimes requires Putty. I did mine with a custom php.ini, but it is limited to 32MB on my server.

ye, I asked my host and they changed the max upload size but the post_max_size needs to be increased as well so waiting on that.

but anways i also need a hand with that psd not attaching..

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

mashby

So in a vanilla version of RC5 and also here, I tried to upload a simple PSD. On the vanilla one, All attachments are allowed but the PSD generated the message you provided. Tried to post the same file here earlier and got the same message.
QuoteYour attachment has failed security checks and cannot be uploaded. Please consult the forum administrator.
Always be a little kinder than necessary.
- James M. Barrie

MLM

Quote from: mashby on May 07, 2011, 08:29:38 PM
So in a vanilla version of RC5 and also here, I tried to upload a simple PSD. On the vanilla one, All attachments are allowed but the PSD generated the message you provided. Tried to post the same file here earlier and got the same message.
QuoteYour attachment has failed security checks and cannot be uploaded. Please consult the forum administrator.

Glad i'm not the only one  ;)

Anybody got a reason why?

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

Illori

admin -> attachments and avatars -> attachment settings is psd in the allowed attachment extensions list? if not please add it and try again.

mashby

I did that on my vanilla RC5:
Attachments mode=Enable all attachments
Allowed attachment extensions=doc,gif,jpg,mpg,pdf,png,txt,zip,psd
QuoteYour attachment has failed security checks and cannot be uploaded. Please consult the forum administrator.
Tried to attach the same file in a reply here and got the same message.
Always be a little kinder than necessary.
- James M. Barrie

MLM

Quote from: Illori on May 07, 2011, 08:49:58 PM
admin -> attachments and avatars -> attachment settings is psd in the allowed attachment extensions list? if not please add it and try again.

Ye I have tried it both ways as well with same results..

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

mashby

If you need a PSD to see for yourself...here ya go, download this:
http://www.choppix.com/images/testpsd.psd
Always be a little kinder than necessary.
- James M. Barrie

MLM

Anyone have a solution or a reason why?

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

MLM

Alright, I have been working very hard on this but all that needs to happen is that the preg will ignore these two cases:

  • Script 0
  • cellTextIsHTMLbool

BTW, the preg i am talking about is on the Subs-Graphics.php in the checkImageContents() function.

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

live627

-nod- that is it. Since I'm not good with regular expressions, I can't help you I'm afraid. Hope a teamie picks up on this soon...

MLM


My Themes:

My Mods:

Unsolved Threads:
  • None atm...

ACAMS


MLM


My Themes:

My Mods:

Unsolved Threads:
  • None atm...

Aleksi "Lex" Kilpinen

The filesize issue is one that can only be handled on the server side - SMF can not override such limits from the host.

The PSD one, seems like SMF is handling it as any other image - and is trying to perform some checks to make sure it actually is an imagefile, and these checks fail for some reason.
What reason exactly, I do not know - but if it fails here as well, then there is probably something wrong with either the file, or the checks performed to it.

I'll link this topic to the devs, so they can take a look at this.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

MLM

Quote from: Aleksi "Lex" Kilpinen on June 13, 2011, 12:37:07 AM
The filesize issue is one that can only be handled on the server side - SMF can not override such limits from the host.

The PSD one, seems like SMF is handling it as any other image - and is trying to perform some checks to make sure it actually is an imagefile, and these checks fail for some reason.
What reason exactly, I do not know - but if it fails here as well, then there is probably something wrong with either the file, or the checks performed to it.

I'll link this topic to the devs, so they can take a look at this.

Thanks for the reply. I kinda have found a way about the large attachments: http://www.simplemachines.org/community/index.php?topic=434237

but the psd has still been stumping me, I hope the devs can fix it.

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

Norv

It can happen that some images do not pass the security checks, it's unavoidable at some point (we had even more extensive checks in an earlier version, but have moved those to another configuration option in admin panel, so enabling them is admin's choice), because images may sometimes contain sequences that are very often found in dangerous scripts, and as such, SMF filters them.
Yet, it shouldn't happen to all .psd images...
I'll take a look at these images here.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Advertisement: