Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

Allowed file types: bug?
https://www.tinywebgallery.com/forum/viewtopic.php?f=12&t=793
Page 1 of 1

Author:  bo [ 22. Jan 2007, 11:55 ]
Post subject:  Allowed file types: bug?

Hello again,

I have found what I think may be a bug. It appears that the "allowed file types" list you enter in the config file only allows for about 10 file extensions. After that, it ignores the rest -- but ONLY when selecting files from your local PC -- it will let you actually upload the files.

Example, I have the following defined:

$allowed_file_extensions = "asf,mov,mp4,mp2,wma,mpeg,wmv,divx,dv,avi,flv,mpg,mod,mp1,mp3,qt,ram,swf,vob,wav,rm,rv";

Now if I have one of each type of file in a folder on my local PC, and go to upload a file, it defaults with "showing allowed file types" as it should, but only shows .asf - .mpg -- the rest are hidden as if they are not allowed.

Can you confirm this is a bug and suggest a fix?

Thank you again for a wonderful tool.

Author:  TinyWebGallery [ 22. Jan 2007, 12:15 ]
Post subject: 

Hi,

But can you upload the files not shown under supported file types? (but are in you list?)

Means - select "all files" in the dropdown and then select one of the files later in the list.

I checked the code - The filelist is o.k. - Do you have any spaces in the list? This is something I have only fixed in my local build.

Maybe this is a restriction of flash or windows itself - maybe they only support a limited number of extensionfilters.

i'll check on my local system.

/Michael

Author:  bo [ 22. Jan 2007, 12:23 ]
Post subject: 

correct... I can see the files if I choose "show all" from the upload window, and the uploader will let me upload the "hidden" ones. It is just that I cannot see them as "allowed files" - which will confuse many people.

Author:  TinyWebGallery [ 22. Jan 2007, 12:57 ]
Post subject: 

Hi,

I checked this - happens for me too. Seems Flash does only support a limited String for filters of extension. (seems like they use an fixed internal buffer)

and the 2.nd problem is tha you have already the version that supports splited files - therfore the extension list internally looks like *.gif,*.gif.part*, ... it's therefore 3 times as long (2 as much filters but 3 times more chars).

In my local build I have changed this and the .part filter will now be added at the end. I made only a quick test where I could use ~ 25 extensions without problems ;).

I do some further testing tonight and send you a new version then.

/Michael

Author:  bo [ 22. Jan 2007, 12:59 ]
Post subject: 

cool... thank you.

Author:  TinyWebGallery [ 23. Jan 2007, 10:03 ]
Post subject: 

Hi,

try this version:
tinywebgallery.com/test/tfu25_beta1.zip

You already have an earlier version of 2.5 - therefore try to replace only the flash first!

AND set $split_extension="FALSE";

I have found the limit the extension list can have to work properly (~ 150 characters). If $split_extension ist set then splitted files are supported and then I look e.g. for *.zip + *.zip.part* - This makes the internal extension list much longer -
This version does detect the length and switches the default selection of the dropdown from supported filetypes to "all files" if this list is to long.

If you set the split_extension to FALSE you can have up to 30 extensions before the limit is reached.

This version right now will most likely the one that will be released - I'm integratin this right now into TWG ;)

/Michael

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/