Search…

X3 Photo Gallery Support Forums

Search…
 
revorgneil
Topic Author
Posts: 18
Joined: 22 Nov 2020, 19:01

Some questions before i purchase

23 Nov 2020, 20:19

So firstly i am not a developer (in the traditional sense) - got into it while building a site for my study group .. so there may be a few non techie terminology issues to resolve :-)

First question is the $39 license fee perpetual or annual?

So i've up to now written all web pages in classic asp (bit of javascript) and integrated bigger jobs and tools (like forum) into the site, i've got image libraries and study boards that run on databases and for document, image folder browsing i use FSO but of course its very clunking and not as slick as this tool .. i love the simplicity in setup and use. 

I am thinking i have two requirements for this tool/app - this ticks the first as is and subject to confirming licensing model with committee i think its pretty much a done deal.. couple issues to date :

1) There are quite a few files and complete folders it doesn't like and at the moment i am not sure why, the folder structure is a none techie persons library of images and docs (word, excel mainly) with a very creative naming convention. I am assuming this will be down to characters or miss matched headers/extensions ?
2) The documents (word, excel) don't want to open online (pop up/new tab etc) instead they download - not sure if this is a local browser setting or a configurable in the app?

For my other requirement i'd like to replace my dowdy vba/FSO image browser interface and use yours - is it possible to introduce a 'selected' file feature that basically holds the path and name and a button that returns it to a window opener :
window.opener.document.getElementById("<%=returnField%>").value = thisFileRtn ?

Only other question i have is around user permissions.. i have a members database and login on the site which once logged in maintains a session variable to allow access, i can hide FilesApp pages behind scripted members only pages but once open or if someone gets to the App through nefarious routes there is no access control (i don't really want to add the single access on top of website login) - is it possible to add some config params around authenticating against a session variables?

Thanks in advance
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Some questions before i purchase

23 Nov 2020, 22:29

Hi! Thanks for your interest in Files app.
revorgneil wrote:First question is the $39 license fee perpetual or annual?
It's a one-time fee, and updates are included.
revorgneil wrote:1) There are quite a few files and complete folders it doesn't like and at the moment i am not sure why, the folder structure is a none techie persons library of images and docs (word, excel mainly) with a very creative naming convention. I am assuming this will be down to characters or miss matched headers/extensions ?
I would need to diagnose this, but it would be related to server and/or file names. The app is definitely created to support complex file names with any characters in any language. It could be that your server is not serving UTF-8 (unicode) for example, or that your server is missing a crucial PHP extension that handles special characters.

Do you have a public link that I could check? If not, perhaps you can send me a sample file that doesn't work?
revorgneil wrote:2) The documents (word, excel) don't want to open online (pop up/new tab etc) instead they download - not sure if this is a local browser setting or a configurable in the app?
Word and Excel files are definitely not by default supported by browsers. When you click a file in X3 (any file), it will open in browser if the browser supports the file type, else it will download. This is not possible to configure in the app unfortunately.
revorgneil wrote:For my other requirement i'd like to replace my dowdy vba/FSO image browser interface and use yours - is it possible to introduce a 'selected' file feature that basically holds the path and name and a button that returns it to a window opener :
window.opener.document.getElementById("<%=returnField%>").value = thisFileRtn ?
I'm actually not 100% sure what you are asking here. You want to include an additional button in the layout interface? And when you click the button, it does what?

You can't easily amend the interface in Files app, as it's created dynamically from a compiled/minified Javascript.
revorgneil wrote:Only other question i have is around user permissions.. i have a members database and login on the site which once logged in maintains a session variable to allow access, i can hide FilesApp pages behind scripted members only pages but once open or if someone gets to the App through nefarious routes there is no access control (i don't really want to add the single access on top of website login) - is it possible to add some config params around authenticating against a session variables?
I must admit, I don't know about your existing "login mechanism", so it's hard to provide proper feedback. The login-mechanism in Files app already uses session-variable, and you could perhaps piggy-back that somehow by editing the index.php file directly. There are no config options to authenticate vs other session variables.
 
revorgneil
Topic Author
Posts: 18
Joined: 22 Nov 2020, 19:01

Re: Some questions before i purchase

24 Nov 2020, 05:01

Thanks for your speedy response, replying a point at a time ..

I have paid for the license  :-)

Ref Points.

1) Files and Folders Errors

The folder error seems to be intermittent as i am sure some folders had errors when i last looked but now not.

I have found that filenames containing # and + currently don't load, removing them fixes the issue.
Would this be related to the PHP special character set handler?
I will look into my host settings - i've not looked at setting a character set before and didn't release i could, i've just moved hosts so will need to re acquaint with new control panel first anyway.
I have to add <meta charset="UTF-8"/>  to my web pages that fetch database data, could your app not define a character set somewhere?.
I've not experienced the character set causing issues referring to file names before? (in my scripts).. however ..
I do have a similar issue where my current image thumbnail generator doesn't handle certain characters well, i note _files has cached (presume thumbnail) files could the issue possibly be related generating a cached file?.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Some questions before i purchase

24 Nov 2020, 10:14

Thanks!
revorgneil wrote:I have found that filenames containing # and + currently don't load, removing them fixes the issue.
Would this be related to the PHP special character set handler?
#+ characters are definitely notorious for creating problems in URL's and file systems, somewhat depending on server, OS and settings I guess, as they convey special meaning. Without knowing the exact context, the browser could also be related. There are many sources of info about this:
is-it-bad-to-use-the-plus-character-in-filenames-for-a-library
use-#-character-in-url-inside-file-name

Having said that, I have tested successfully from here on PHP 7 / Apache / Mac OS:
Image
revorgneil wrote:I have to add <meta charset="UTF-8"/>  to my web pages that fetch database data, could your app not define a character set somewhere?.
If that is the problem in the first place ... In Files app, the "list" of files is loaded in JSON format, and that should probably be served as UTF-8. You can check this by opening browser > developer tools > network inspector, then click to load a menu item, check the data that gets loaded, click it, view response headers and you might see some "charset". This should normally be set from SERVER (eg htaccess, nginx config or web.config, depending on server type). However, in regards to +# chars, I am not sure this is the issue ...
revorgneil wrote:I've not experienced the character set causing issues referring to file names before? (in my scripts).. however ..
I can't diagnose any more without a link. I have certainly afforded maximum effort to support complex filenames in Files app, which involves path encoding (on server/PHP) and then path decoding when loaded (in javascript) using pretty standard procedures (because both PHP and JS has specific methods exactly for this). Exactly what error are you getting? What happens when you click to open the item? What happens when you right-click "open in new tab"? It should load the original file, untouched by the Files app ...
revorgneil wrote:I do have a similar issue where my current image thumbnail generator doesn't handle certain characters well, i note _files has cached (presume thumbnail) files could the issue possibly be related generating a cached file?.
Yes. For this to make any sense though, I would like to know if the original (large) image loads after clicking an image thumbnail that is broken. It is very likely that thumbnails might fail to load with # and + in the filename ... #hashtag is not really allowed in url's ... For example /path/image#name.jpg will try to load /path/image (everything before the #hash).

What happens when you try to load an image with #hashtag in the filename directly in browser? I can't see how that's supposed to work in the first place ...

I checked what happens here when using #, and the thumbnails get encoded correctly using %23. However, not sure about the original source. Definitely unfortunate characters.
index.php?file=test%2Fgah%23heh%2Ffile%23hehe.jpg
 
revorgneil
Topic Author
Posts: 18
Joined: 22 Nov 2020, 19:01

Re: Some questions before i purchase

25 Nov 2020, 08:51

Thanks again for replies, quick response - i will try and do more investigation and get back soon  :-)
 
revorgneil
Topic Author
Posts: 18
Joined: 22 Nov 2020, 19:01

Re: Some questions before i purchase

25 Nov 2020, 17:19

So did some more playing, not sure if it advances us anywhere .. 
Trying to load the unavailable image (with #) into new tab (the original) results in:
Image

The intermittent folder error i mentioned returned :
Image

Looking in folder i noted the first list item (alphanumeric) had an # in filename.. however returning to view the folder displayed as well as the 1st file :
Image
.. however files further down with # in file name did not display.
.. AND trying to load the 1st file to new tab resulted in same first error 
.. trying to display the image resulted in could not be displayed error :
Image
Ps. The 1st file although displaying doesn't look like a thumbnail, just reduced original.

So would appear both the file display and folder display are related to character references.

Below if the reference if you want to check .. this folder 
http://maltastudycircle.net/site/userfi ... _bower.php
The folder Forbes-Bentley/Incoming/1930-39 contains the 1st file with # 

Some background this is a philatelic study group site, many collectors collect reference material, this tool is to aide viewing these libraries, i upload from a disk 'as is' so can be in any state, the library i want to uload is 10GB and 1000's files so i don't want to get into editing their file names, plus when they send updates it will just recreate as a new (but duplicate) file.

Thanks,
Neil
 
revorgneil
Topic Author
Posts: 18
Joined: 22 Nov 2020, 19:01

Re: Some questions before i purchase

25 Nov 2020, 17:57

Just to add i got round to checking my hosts php config (cripes there are loooads of settings).. its set to use UTF-8 by default
Image
I didn't see any other 'crucial extended' charset options - you may need to be a bit more specific on that one?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Some questions before i purchase

25 Nov 2020, 23:21

revorgneil wrote:Below if the reference if you want to check .. this folder 
http://maltastudycircle.net/site/userfi ... _bower.php
The folder Forbes-Bentley/Incoming/1930-39 contains the 1st file with # 
Arrgh, why you didn't post this on the top of your post as it's exactly what I need to diagnose instead of screenshots  :clap:

Ok, indeed there is a problem with #hash character, and it needs special encoding because #hash cannot be part of an URL basically. When accessing the file #34.jpg directly in browser, it returns "forbidden" (I don't know why it returns "forbidden" instead of "404 file not found", but that's n ot relevant):
/Forbes-Bentley/Incoming/#34.jpg

The hashtag needs to get encoded to %23 in URL's. So here is the working link:
/Forbes-Bentley/Incoming/%2334.jpg

And then you have another #hash file 1931.5 REG-72 May #34 $ 9.16.jpg which actual works in the gallery layout. The reason for this, is because Files app is creating a "thumbnail" (resized image) for this file (because it's dimensions are above the resize threshold) and resized paths are always correctly encoded. Here is the resized version, correctly encoded:
roger_bower.php?file=Forbes-Bentley%2FIncoming%2F1930-39%2F1931.5%20REG-72%20May%20%2334%20%24%209.16.jpg&resize=480

However, when clicking to open this item in your Files app, the link to the "original" (src) is still un-encoded, and therefore won't load. To conclude, I haven't added encoding to original file paths because mostly the file system / browser can deal with this itself ... However, #hashtags convey special meaning in browsers and will delimit the file to everything that comes before the #hash.

This can likely be resolved. However, do you have links/references to any other issues with other characters? I can see an issue where your server might not like + characters, but unlike the #hashtag issue (which I can reproduce locally), this is not entirely the same. However, it could be we can encode the + char also, although + char works fine here:
Image
 
revorgneil
Topic Author
Posts: 18
Joined: 22 Nov 2020, 19:01

Re: Some questions before i purchase

26 Nov 2020, 04:20

Ok sounds like we are getting somewhere :-)
I hesitated adding url in public forum in case it exposed any vulnerability.. i guessed it probably didn't.
As mentioned before re issues with my current thumbnail generating code, after upload i do rename certain characters in file name..  # + & and [space]
Only just thought about checking that! .. so weirdly have found same issues with # +  .. clearly [space] works .. i have just tested loading a file with & and it worked, it wasn't very big so may have missed the thumbnail?
Image
LOT & 3755.jpg (2171×1412) (maltastudycircle.net)

Ironically when browsing my hosts management panel there were loads of freebie image gallery viewers.. however i still really like this neat little tool so will still be looking to get the most out of this  :thumbsup:

Did i read somewhere FilesApp will allow online file management?  {delete;rename;upload}  or does it all need to be done via backend FTP etc.

Thanks for continued quick responses.

Neil
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Some questions before i purchase

26 Nov 2020, 05:14

revorgneil wrote:Ok sounds like we are getting somewhere :-)
Ok, so just to be clear, the only current problem is with #hash tag in file names? I can't see any references to any non-working other file paths ... If only #hash, I might be able to provide a code-patch as this could likely be fixed in the PHP file.

Do you still have problems with "+"? If so, do you have a reference example I can check?
revorgneil wrote:I hesitated adding url in public forum in case it exposed any vulnerability.. i guessed it probably didn't.
Probably not, but I have now removed the links in previous posts for the sake privacy.
revorgneil wrote:Only just thought about checking that! .. so weirdly have found same issues with # +  .. clearly [space] works .. i have just tested loading a file with & and it worked, it wasn't very big so may have missed the thumbnail?
& should not be a problem ... & is only an issue when used in url parameters, for example ?width=100&file=path/my&image.jpg, because "&" is used to delimit parameters. However, parameters are only used in the resize script, in which case it's correctly encoded anyway:
roger_bower.php?file=Grech%20X%2FLOT%20%26%203755.jpg&resize=480&d646f9.1602774840.491633

So just to be clear, the image resizer always works, and images with "&" will also work (also when not resized). The image resizer will also work with #hash (because url is encoded), but not the original source file, because when loaded in browser, the #hash will limit the file name (everything AFTER the #hash is not considered part of the file name).
revorgneil wrote:Ironically when browsing my hosts management panel there were loads of freebie image gallery viewers.. however i still really like this neat little tool so will still be looking to get the most out of this  :thumbsup:
Indeed there are many similar apps, and there are some very nice/advanced ones, but most of them don't have the emphasis on a clean, modern, functional and fast user interface. Another point of Files app, is that it's a single file, which makes it easy to install and remove.
revorgneil wrote:Did i read somewhere FilesApp will allow online file management?  {delete;rename;upload}  or does it all need to be done via backend FTP etc.
Yes, that is the plan ... Files app is a work in progress.
 
revorgneil
Topic Author
Posts: 18
Joined: 22 Nov 2020, 19:01

Re: Some questions before i purchase

26 Nov 2020, 06:47

Hopefully you now know the base url for testing and can just add the sub dirs for you.

In {base}/Grech X    i loaded several test files ..

LOT + 3755.jpg (small poss less than thumb gen size)
vars +.jpg (larger)

LOT + 3755.jpg  -  displays in initial listing but does not load or open in new tab (i get 404 error now)
vars +.jpg  -  no initial display and suffers same errors as above

Re tested the & character with larger file ..

vars &.jpg  -  no initial display BUT displays original in new tab etc

So i would deduce that both + and & break the thumb generator (same as the script i use).. i know with mine i do pass the file name in a url param
+ seems beak the code to send to new tab or load display

Of course there could be other things that effect - char padded my space, char at end or start ? .. too many variants to test now.

Thanks,
Neil
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Some questions before i purchase

26 Nov 2020, 07:43

revorgneil wrote:In {base}/Grech X    i loaded several test files ..
Ok, so first of all, in the gallery layout, you see a generic "JPG" icon for the +& images, correct? This is expected behavior because the images are extremely huge 6961 x 11996 / ~ 26.74 MB. Files app measures PHP memory_limit and calculates that you do not have enough RAM/memory available to resize those images (which is expected with images that large). It would be incredibly unproductive to load the original images directly into the layout, as it would require loading 50+ MB and the interface would become incredibly sluggish.

So, this is correct behavior. There is a config option image_resize_memory_limit, which allows you to temporarily increase the allowed memory limit, but that requires that the assigned memory limit is in fact available on your server. Also, you may need to tweak the image_resize_max_pixels also, to allow resizing extremely large images like this. By default, images that exceed sensible sizes for PHP to resize, will display as a generic JPG icon.

Click "vars &.jpg"
As far as I can see, the image loads fine on click, so essentially there is no problem with the & character.

Click "vars +.jpg"
This seems to be a problem related to server and + character, which is not unheard of. Even when I try to encode the URL properly (replacing "+" with "%2B") to vars%20%2B.jpg, it still does not load in the browser (outside the Files app). Therefore, if you can't get images with "+" to load directly in browser, there is no way Files app can work around it either. I tried:
/Grech%20X/vars%20+.jpg No
/Grech%20X/vars%20%2B.jpg No

So the remaining issue is with "+" char, but I can't currently see that your server supports this character. I assume this server might be Windows IIS? This is a known issue:
https://stackoverflow.com/questions/460 ... in-iis-7-x
https://forums.iis.net/t/1155943.aspx
 
revorgneil
Topic Author
Posts: 18
Joined: 22 Nov 2020, 19:01

Re: Some questions before i purchase

26 Nov 2020, 09:31

Ok thank you feedback again - hopefully i am not seen as a pest ! .. and hopefully helping to test your app.
displaying a JPG Image sizing and normal behavior .. great, understand that now.
+ .. yes it is hosted on a windows server .. and great again - its good to know restrictions so i can guide collectors in the first instance and answer their questions explicitly.. believe me i have had collectors try and load images into our study board and complain things 'aren't working' then i see these awful naming conventions they have used and i have little sympathy, its good to know professional tools and coders like yourself have verified i am not missing something simple. {i blame MS for allowing these mad file names in the first place}.

So hopefully i can leave you alone for a bit now !   :relaxed:  in summary  :

There could be some coding to improve the # character support,
& and [space] are not issues,
The + will potentially have issues and should be avoided at all times.  

Thanks again.
Neil
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Some questions before i purchase

26 Nov 2020, 10:36

I'm only happy to diagnose compatibility issues that may lead to app improvements.
revorgneil wrote:There could be some coding to improve the # character support
I might look into it tomorrow, in which case there may be a patch you can apply in the PHP file. This should be fixed ...
revorgneil wrote:& and [space] are not issues
I believe these characters are working fine (also on your server). The images that display as a "JPG" icon is simply because of the huge image dimensions vs memory limitations, and are not related to the file name. If your server is powerful enough, you could easily try to increase image_resize_memory_limit to 512 and image_resize_max_pixels to 100000000 and see if the the thumbnails then get created ... If so, you may have to empty /_files/cache/folders first after changing the settings.
revorgneil wrote:The + will potentially have issues and should be avoided at all times.
I am not 100% certain, but it seems the + character does not work in URL's (on this server) even when encoded.

Good luck!  :star:
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Some questions before i purchase

26 Nov 2020, 22:27

mjau-mjau wrote:
revorgneil wrote:There could be some coding to improve the # character support
I might look into it tomorrow, in which case there may be a patch you can apply in the PHP file. This should be fixed ...
No luck with a quick fix for #hash in file names unfortunately. There are some uniquely strange things with this character, and I need to look into it and likely amend the Javascript also.