readsoftware / ReadIssues

This is an issue repository for READ. Intended for issues and feature change request that arise during testing and development.
0 stars 0 forks source link

Image Upload Path flexibility for deployment and workflow #187

Open stevewh opened 3 years ago

stevewh commented 3 years ago

There is a current configuration issue where processing systems have to match deployment systems in image file directory structures. Currently you can define the "document root" relative path for uploaded images and the URL is calculated and stored into the database. This is further problematic that the code doesn't allow grouping of the images as the current code creates a directory for each db using DBNAME and a subdir named using the "txt"+txt_id of the Text entity that makes it difficult to phase work or divide work using separate databases.

stevewh commented 3 years ago

The proposed solution is to adjust the path for uploaded files to default as it is currently and use some new configuration CONSTANTS in config.php to direct teh algorithm. IMAGEPATHUSEINVNO a boolean which directs the image code to use the txt_ckn in place of the text tag 'txt'+txt_id for the subdir IMAGEDBPATH which is an umbrella directory to aggregate images which default to DBNAME to aggregate by database. Note that an empty string will place images in subdirs according to the above under the IMAGE_ROOT

xadxura commented 3 years ago

Issue description looks good to me. Thanks!

IanMcCrabb commented 3 years ago

Looks like we can take advantage of the new capability at some stage.