PHP How to export image from large object Postgresql -


i have postgresql database stores images in large objects application (i can't change type, avoid use bytea type store images). trying export images database image files in web server through pg_lo_export() php function doesn't work.

is there solution problem?

i have searched answer on google before posting found no solution.

thanks in advance.

regards.

[edit] there php code:

pg_query($con, "begin"); $oid = pg_lo_import($con, $_files['userfile']['tmp_name'][$i]); pg_query($con, "commit"); if(!is_dir("images/colaboration"))     mkdir("images/colaboration"); pg_query($con, "begin"); pg_lo_export($con, $oid, "images/colaboration/eiffel.jpg"); pg_query($con, "commit"); echo "<image src='images/colaboration/eiffel.jpg' />";" 

with code image never creates getting 404 html error.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -