Jump to content

zilav

uniGUI Subscriber
  • Posts

    573
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by zilav

  1. s := '20160911195120'; datetime := EncodeDateTime(StrToInt(Copy(s, 1, 4)), StrToInt(Copy(s, 5, 2)), StrToInt(Copy(s, 7, 2)), StrToInt(Copy(s, 9, 2)), StrToInt(Copy(s, 11, 2)), StrToInt(Copy(s, 13, 2)), 0);
  2. http://serverfault.com/questions/223496/recycle-remote-iis-app-pool-from-the-command-line
  3. In that case just redirect FTP server's default dir to any subfolder inside UniGUI's folder and upload there. No need to do anything in UniGUI app itself.
  4. Only if you run a single instance of UniGui app on the host machine (standalone or server). ISAPI won't work at all. If you still insist on using FTP, then install any free FTP server. From your VCL app generate unique name for a file to upload (probably some hash), send it to FTP server with TIdFTP, then http POST uploaded unique file name to UniGUI app as I've shown you.
  5. Here is an example from my project where I generate thubmnails and upload them to S3 with public access for internet shop. function TFrameItems.UploadThumbnail(aStream: TStream; aName: string): Boolean; var s3: TAmazonS3; begin Result := False; s3 := TAmazonS3.Create(Self); try try s3.AccessKeyID := data.GetSetting('AWSAccessKeyId'); s3.SecretAccessKeyID := data.GetSetting('AWSSecretKey'); s3.AmzHeaders.Values['x-amz-acl'] := 'public-read'; s3.AmzHeaders.Values['x-amz-storage-class'] := 'REDUCED_REDUNDANCY'; s3.UploadObject(data.GetSetting('AWSBucketName'), aName, 'image/jpeg', aStream); Result := True; except // handle error here end; finally s3.Free; end; end; AmazonS3.zip
  6. I made a simple demo app to post "test.txt" file and receive POST request in UniGUI. It will output encoded multipart data stream, google how to decode it with Indy, there are plenty of examples like this. Don't have time myself to implement that. I'd rather use clouds anyway. UniPostFile.zip
  7. SeverModule has event for custom HTTP requests, so you can POST a file as octet stream from VCL app to your UNI app. However I recommend to use cloud services like Amazon S3 for example. There are existing Delphi libs to manage cloud services and you'll get a working link when file is uploaded without cluttering your server.
  8. It is not about difficulty, but rather possibility. Client side validation is possible to remove especially on modern browsers with bulit-in dev tools and debuggers, that's enough for it to be insecure.
  9. But insecure for critical data, client side validations can be easily removed by anyone. I still recommend to validate on server too in addition to client side just in case.
  10. I think you can also add @import in unigui's theme specific css files.
  11. Make sure that Indy timeout is less than AjaxTimeout of unigui just in case.
  12. Add your own ShowModal* version which will accept parameters and call the original one.
  13. Yep, just load it with Indy and paste into memo.
  14. Big data is filtered on server, not on client. Rewrite your queries to accept search/filter parameters and return a limited result set.
  15. http://stackoverflow.com/questions/24174023/win2008-r2-iis-7-5-no-default-printer-installed-error-from-isapi-web-service
  16. It is impossible in the web for security reasons.
  17. Then you need to update the link in "onselect", "oncheck" or whatever event is called upon records selection by calling ajaxRequest. Ping Delphi Developer, he is our pro at ExtJS events
  18. The only way is to actually force user to click the link, this is a security measure in browsers to prevent sites from launching associated apps themselves. the same way as browsers asking you what to do with downloaded file instead of launching associated apps on their own. If your mailto address depends on lets say the selected row in dbgrid, update UniLabel link in AfterScroll event.
  19. Дизайн в стиле интернета конца 90-х, классика
  20. Usually the size of pool is set to an average expected number of clients to work at the same time. However pools are dynamic and will expand if more connections are required. Check FireDAC docs.
  21. The better is multiple connections with pooling. I don't use FireDAC and don't have any idea about it's support for pooling. In the worst case you can write your own connections pool. Edit: a quick google attempt shows http://docwiki.embarcadero.com/CodeExamples/Berlin/en/FireDAC.Pooling_Sample
  22. It is not strong, superior, bad or whatever. Just another combination of time proven software for web which is currently being replaced by other modern technologies like NoSQL databases, NodeJS. etc which can excel at different tasks where LAMP is not the right choice. The same as UniGUI being better at single page web applications. It is very popular though in web hosting and web development with a lot of complete solutions for majority of typical tasks you want from a web site. My own web development experience started back in early 2000's with LAMP.
  23. It took only 15 posts in a thread before you mentioned that hardware is installed on a client machine(s) and not on another server. In that case what you want is impossible from within web application and unigui is not the right tool for your task. A traditional client-server application is required. ps. Unless you can configure all hardware on all your client machines to be connected to a single server which can issue commands.
  24. I specifically said to NOT interact via browser, but instead from unigui app on the server which can communicate using any protocol and port with other servers.
  25. Client machines should send events into your unigui app, which in turn will connect and send commands to the other server(s). This way you only need to configure firewall and other required services on your unigui server, not on every client.
×
×
  • Create New...