Jump to content

FFREDIANELLI

uniGUI Subscriber
  • Posts

    202
  • Joined

  • Last visited

Posts posted by FFREDIANELLI

  1. Hi friends, I can create a presigned url of s3 aws service, and put in UniURLFrame1.URL , but it not show the pdf file it download the file... someone knows how to show it ? not download...

    This is the URL received by the application from AWS.

    https://nidoc-1.s3.us-east-1.amazonaws.com/N_OC%2FOC-3-3.PDF?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230623T185700Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=8c2a0ad457a23757b954638a52407ec345e3ef569b4f4758f615a3d2ad0e8da0

     

  2. ok, there are some examples to show how to put qtd of items in the group header, some text explaining the group, but none of how to show a date header in DD/MM/YYYY

    i found this javascript function 

    function format(inputDate) {
      let date, month, year;

      date = inputDate.getDate();
      month = inputDate.getMonth() + 1;
      year = inputDate.getFullYear();

        date = date
            .toString()
            .padStart(2, '0');

        month = month
            .toString()
            .padStart(2, '0');

      return `${date}/${month}/${year}`;
    }
     

    but how to adapt this function , that now show the qtd items (cool) but with the date in DD/MM/YYYY format ?

    function beforeInit(sender, config)
    {
      sender.disableSelection = true;
        var groupingFeature = Ext.create('Ext.grid.feature.Grouping', {
            groupHeaderTpl: new Ext.XTemplate(
                '{columnName}: {name} ({[this.countTotal(values.rows)]})',
                '', {
                    countTotal: function(records) {
                        var totalSum = 0;
                        totalSum = records.length;
                        return totalSum;
                    }
                }
            ),
            hideGroupedHeader: true
        });
        config.features = [groupingFeature]
    }
     

    Some help will be appreciated , thenks in advance.

    Date.png

  3. Hi Sherzod

    No code involved, i just enabled grouping , summary and show value, the title i let the name of the field..., iin the dbgrid, and thats it... it shows the header of grouping followed by the date correclty , but the format not follow the datasource display format , and i do not find any display format in this grouping opptions, it shows in gmt format...

     

  4. Hi sherzod, i found my profile, I dont know why i have 2, this one is the FFREDIANELLI, with image and email, the other FABIO FREDIANELLI problably was a mistake.

    I Found a workarround, put an actioncolumn in the dbgrid, then the problem disapeared. May be the actioncolumn have some other routine to analize this onclikcell...when filter is enabled,  only Farshad to answer...

    But if you want to test just put an event onclicel (may be a showmessage) in the demo filter 2

    Im using an image in a field the image is 24x24 pix , and using the onclickcell to start a form,but if filter is enabled the event is not fired, if i cound change the size of the image of actioncolumn....

  5. 20 minutes ago, FFREDIANELLI said:

    Hi, 

    Just to inform the friends that tryed to help,I found the guilty guy, IPWORKS S3 component, i bougth this component do store and retrive objects from aws s3 service, it works perfectly, but for some reason that only the unigui developpers can say if the program starts by email call it fail to access Amazon, if i start by address tab of the browser everything is ok.

    I first removed the component and the problem gone, than tried to create the component dinamicaly on run time with some delay.. to let unigui ajust some things ? same problem, than i put the action off retriving the object ( a pdf statement stored on s3 ) in a ttimer with 5 seconds delay to see the action, the application open paint controls than after the 5 seconds it exit the application (problably with the Denied acess message...but is too fast to see,)

    So to me the question is that the difference between starting the application typing the address or by email link.

     

    just another test... now i changed the ipworks by native delphi amazon component, same effect...

  6. Hi, 

    Just to inform the friends that tryed to help,I found the guilty guy, IPWORKS S3 component, i bougth this component do store and retrive objects from aws s3 service, it works perfectly, but for some reason that only the unigui developpers can say if the program starts by email call it fail to access Amazon, if i start by address tab of the browser everything is ok.

    I first removed the component and the problem gone, than tried to create the component dinamicaly on run time with some delay.. to let unigui ajust some things ? same problem, than i put the action off retriving the object ( a pdf statement stored on s3 ) in a ttimer with 5 seconds delay to see the action, the application open paint controls than after the 5 seconds it exit the application (problably with the Denied acess message...but is too fast to see,)

    So to me the question is that the difference between starting the application typing the address or by email link.

     

    • Thanks 1
  7. 10 minutes ago, irigsoft said:

    what is you starting URL, is it different from email url ?

    if so then tray to add some headers in UniGUIServerModuleHTTPCommand 

    like:

    //send the origin, path, and querystring when performing a same-origin request.
      AResponseInfo.CustomHeaders.AddValue('Referrer-Policy', 'strict-origin-when-cross-origin');
     

    other possible reason is Your URL starts with https and You redirect to http, (If you dont have headers for that then google can blocked You)

    uniServerModule.Options.soAutoRedirectHttps = False;

    and end of all,

    try to create test case with one button that open link in new window (and tell me is it work?)

    Searching in the folder there is only one ocurrence of the Denied Acess , I think that only who has access to the unigui sources can say where it is used...

    uIdResourceStrings_RSStackEACCES,    L"Access denied."

     

×
×
  • Create New...