Page 1 of 1

image upload to use just value in DB

Posted: Tue Aug 06, 2013 12:20 pm
by wazsxr

Hi,
I'm trying to integrate PHPMaker as a front end to an existing CMS. The current system stores the image file location relative to the root directory of the site. I've tried to use the stock PHPMaker settings giving the image field a setting for the upload folder relative to the PHPmaker install ("../library/news/") yet it still tries to use a thumbnail directory and a temp directory in front of this setting. Is there any way to force PHPMaker to use the raw data from the DB and don't apply any prefixes?

Regards,
-Warren


Re: image upload to use just value in DB

Posted: Thu Aug 08, 2013 9:49 am
by Webmaster
  1. Note that field specific upload folder is relative to the application root of your project, do not use "../", see Field Setup in the help file,
  2. Temp folders are temporary during Add/Edit only, when the record is actually saved, the files will be saved to the upload folder.
  3. Scripts do NOT "apply any prefixes", the file name saved in the database is used unless image resize is required.

Re: image upload to use just value in DB

Posted: Thu Aug 08, 2013 6:17 pm
by wazsxr

Thanks for the reply. So there is no way of getting phpmaker to post the image files bellow the application root directory?
or appending a lower directory to the value uploaded into the DB field?
i.e. currently the value that gets posted to the DB is just the image name, could I append the path to the front of the file name so the application can find the image?
i.e. /doccument_root/portal/upload/image.jpg instead of just image.jpg
where phpmaker is located at the portal folder.


Re: image upload to use just value in DB

Posted: Fri Aug 09, 2013 6:19 pm
by danielc

You can set the [View Tag] panel -> HREF field to its field name. Then, the file name will have hyperlink to include the path to download the file if you click the name.