image upload to use just value in DB

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
wazsxr
User
Posts: 18

image upload to use just value in DB

Post 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


Webmaster
User
Posts: 9430

Post 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.

wazsxr
User
Posts: 18

Post 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.


danielc
User
Posts: 1601

Post 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.


Post Reply