Hello
Please, need your help.
Where are stored attachement, how to select all atachement of specific user and download one time?
Thank you
Attached file - AppGini 24.15
Re: Attached file - AppGini 24.15
By default, attachments are stored in the subdirectory
images
inside your app folder.This could be done via JavaScript code inhow to select all atachement of specific user and download one time?
hooks/tablename-dv.js
... the basic idea is to find all attachment links from current record and then trigger a click event on each. You might perhaps want to distance each click with an interval of one second or so. AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
- Need personalized consulting on your specific app and customizations? Book an online call with me here.
Re: Attached file - AppGini 24.15
Hello Ahmed
Thank you for kind support.
Going to have a try
Thank you for kind support.
Going to have a try
Re: Attached file - AppGini 24.15
I ask help from ChatGTP and this is the answer, what do you thing about?
// Ensure the script runs only after the DOM is fully loaded
jQuery(function($) {
// Function to trigger clicks on attachment links
function triggerAttachmentClicks() {
// Select all attachment links within the current record view
var attachmentLinks = $('a.attachment-link-class'); // Replace 'attachment-link-class' with the actual class or selector
// Define the interval (in milliseconds) between each click
var interval = 1000; // 1 second
// Loop through each attachment link and trigger a click with a delay
attachmentLinks.each(function(index, element) {
setTimeout(function() {
$(element).trigger('click');
}, index * interval);
});
}
// Call the function to start triggering clicks
triggerAttachmentClicks();
});
// Ensure the script runs only after the DOM is fully loaded
jQuery(function($) {
// Function to trigger clicks on attachment links
function triggerAttachmentClicks() {
// Select all attachment links within the current record view
var attachmentLinks = $('a.attachment-link-class'); // Replace 'attachment-link-class' with the actual class or selector
// Define the interval (in milliseconds) between each click
var interval = 1000; // 1 second
// Loop through each attachment link and trigger a click with a delay
attachmentLinks.each(function(index, element) {
setTimeout(function() {
$(element).trigger('click');
}, index * interval);
});
}
// Call the function to start triggering clicks
triggerAttachmentClicks();
});