Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Inconsistent Image File Types?
12-12-2018, 11:52 PM,
Inconsistent Image File Types?
It looks like in some cases we are able to handle JPG, JPEG, and PNG file formats for stock items but in some scripts we only expect to find and use JPG file formats.

For example in SelectProduct.php we have:

PHP Code:
$SupportedImgExt = array('png','jpg','jpeg'); 

But in PrintWOItemSlip.php we have:

PHP Code:
if(file_exists($_SESSION['part_pics_dir'] . '/' .$StockId.'.jpg'
12-13-2018, 12:03 AM,
RE: Inconsistent Image File Types?
We should accept any image file that browsers can show.

Shows how to do this client side, though as it points out we should still do server side validation checks as well.

12-13-2018, 12:13 AM,
RE: Inconsistent Image File Types?
Again... Not being critical... Just observational...

I am a bit of a consistency freak so I always prefer to ask...

In our case we have a mix of JPG and PNG stock images which is why it came to light.
12-13-2018, 12:25 AM,
RE: Inconsistent Image File Types?
Paul it is exactly these sort of things we need people to pick up on. It's stuff that the developers don't always notice.

Please keep up the good work Smile
12-13-2018, 12:52 AM,
RE: Inconsistent Image File Types?
Thank you for the kind words.

I wish I had more PHP+HTML coding experience so I could be of much more help. It is relatively easy for me to change/extend webERP code but a bit difficult for me to create new code. The only PHP work I do is on this project, though we have many other PHP apps running on our servers.

The good news is I have touched a lot of webERP code so I have learned a lot about PHP, HTML, and webERP. Fortunately my DB+SQL experience is quite extensive so that piece is a breeze for me.

I will continue to try my very best to help with this project...

Forum Jump:

Users browsing this thread: 1 Guest(s)