I created a table then added a field to record the image name. When i run my app I can upload an image but there is no button to delete an image after it is uploaded. I need a way to delete these images.
My second problem is I need to specify the folder that the image will be uploaded into; I will have 12-18 such folders. How can I do this?
TD
Working wirh Images
Re: Working wirh Images
Hi,
in the detail view you should have the option to remove the image.
The image path is controlled via the
$Translation['ImageFolder'].
So if you change that you can change the directory to which the image will be saved.
in the detail view you should have the option to remove the image.
The image path is controlled via the
$Translation['ImageFolder'].
So if you change that you can change the directory to which the image will be saved.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Working wirh Images
There doesn't seem to be a detail view of the records in this table. Attached is a screen capture of the app. Clicking on the record does nothing.
The user has permission to do everything to the detail view.
TD
The user has permission to do everything to the detail view.
TD
- Attachments
-
- inspections.jpg (41.25 KiB) Viewed 2832 times
Re: Working wirh Images
Hi,
I guess the issue is that you have enabled zooming for the images and hence there is no link to the detail record any more.
So, either you disable that option,
or you make the description mandtory (like this you can click on that link to go to the detail view)
or you create a custom action (see https://bigprof.com/appgini/help/advanc ... ch-actions) in order to select the record and go to the details of that record
or ...
I guess the issue is that you have enabled zooming for the images and hence there is no link to the detail record any more.
So, either you disable that option,
or you make the description mandtory (like this you can click on that link to go to the detail view)
or you create a custom action (see https://bigprof.com/appgini/help/advanc ... ch-actions) in order to select the record and go to the details of that record
or ...
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Working wirh Images
Thanks pbottcher, disabling zooming fixed the problem. The user can still zoom the image in Detail view. How would one know that selecting zooming causes this issue...anyways thank you for your help, much appreciated.
Now, can you get me started on how to go about changing $Translation['ImageFolder'] when the new image is saved? There will be 12-18 folders for images.
TD
Now, can you get me started on how to go about changing $Translation['ImageFolder'] when the new image is saved? There will be 12-18 folders for images.
TD
Re: Working wirh Images
I tried this but it doesn't work, can someone point me in the right direction please?
TD
TD
Code: Select all
function inspections_before_insert(&$data, $memberInfo, &$args) {
$Translation['ImageFolder'] = './images/duck-season-2020/';
return TRUE;
}
function inspections_after_insert($data, $memberInfo, &$args) {
$Translation['ImageFolder'] = './images/';
return TRUE;
}
Re: Working wirh Images
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Working wirh Images
Thanks for helping pbottcher. Can you explain what "global $Translation" does?
TD
TD
Re: Working wirh Images
Hi,
it makes read the $Translation array as a global variable rather than a local one. Otherwise $Translation would be a local one and no changes would happen.
it makes read the $Translation array as a global variable rather than a local one. Otherwise $Translation would be a local one and no changes would happen.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Working wirh Images
Problem with deleting image:
See also viewtopic.php?f=11&t=4080&p=17747#p17747
See also viewtopic.php?f=11&t=4080&p=17747#p17747
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools