Jump to content
uniGUI Discussion Forums

Search the Community

Showing results for tags 'Download'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • uniGUI Public
    • Announcements
    • General
    • Feature Requests
    • Installation
    • Deployment
    • Other Platforms
  • Licensing
    • Licensing
    • Ordering uniGUI
  • Bug Reports
    • Active Reports
    • Closed Reports
    • Old Bug Reports
  • uniGUI Development
    • uniGUI 1.x
    • Beta Releases
    • Utilities
  • Mobile Platform
    • uniGUI Mobile
    • Mobile Browsers
  • Users Area
    • Sample Projects
    • Components and Code Samples
  • Non-English
    • Non-English
  • Miscellaneous
    • Hosting
    • Server Security
    • Jobs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 4 results

  1. I am using:- UniSession.SendFile(sFileName, ExtractFileName(sFileName)); To download jpg files and it works fine on Desktop HOWEVER it does not work on iPhones. I know iPhones control all downloads but pdf's can be easily downloaded from websites ? Please advise how - thanks.
  2. I currently have a VCL form that downloads and extracts a file as soon as it's showed. I have tried converting it to UniGUI but I get the following problems: Progress bar doesn't work. The form caption does not update. It downloads the zip file but gets a access violation when it wants to extract the downloaded zip file. Here is my VCL form unit: unit uOxideModInstaller; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.ComCtrls, Vcl.StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, System.Zip, ActiveX, IdSSLOpenSSL; type TDownload = class; Tfrmoxidemodinstaller = class(TForm) pb1: TProgressBar; btn1: TButton; procedure FormShow(Sender: TObject); procedure btn1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; TDownload = class(TThread) private httpclient: TIdHTTP; url: string; filename: string; maxprogressbar: integer; progressbarstatus: integer; procedure ExtractZip(ZipFile: string; ExtractPath: string); procedure idhttp1Work(ASender: TObject; AWorkMode: TWorkMode; AWorkCount: Int64); procedure idhttp1WorkBegin(ASender: TObject; AWorkMode: TWorkMode; AWorkCountMax: Int64); procedure UpdateProgressBar; procedure SetMaxProgressBar; protected procedure Execute; override; public constructor Create(CreateSuspended: boolean; aurl, afilename: string); destructor Destroy; override; end; var frmoxidemodinstaller: Tfrmoxidemodinstaller; implementation {$R *.dfm} { Thread } constructor TDownload.Create(CreateSuspended: boolean; aurl, afilename: string); begin inherited Create(CreateSuspended); httpclient := TIdHTTP.Create(nil); httpclient.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(httpclient); httpclient.HandleRedirects := True; httpclient.OnWorkBegin := idhttp1WorkBegin; httpclient.OnWork := idhttp1Work; url := aurl; filename := afilename; end; procedure TDownload.idhttp1Work(ASender: TObject; AWorkMode: TWorkMode; AWorkCount: Int64); begin progressbarstatus := AWorkCount; Queue(UpdateProgressBar); end; procedure TDownload.idhttp1WorkBegin(ASender: TObject; AWorkMode: TWorkMode; AWorkCountMax: Int64); begin maxprogressbar := AWorkCountMax; Queue(SetMaxProgressBar); end; procedure TDownload.Execute; var Stream: TMemoryStream; begin Stream := TMemoryStream.Create; try httpclient.Get(url, Stream); Stream.SaveToFile(filename); frmoxidemodinstaller.Caption := 'Done Downloading. Extracting...'; //Sleep(2000); ExtractZip('oxide.zip', GetCurrentDir); finally Stream.Free; end; end; procedure TDownload.UpdateProgressBar; var ZipFile: string; begin frmoxidemodinstaller.pb1.Position := progressbarstatus; frmoxidemodinstaller.Caption := 'Downloading...'; { if frmextradownload.pb1.Position = frmextradownload.pb1.Max then begin frmextradownload.Caption := 'Done Downloading. Extracting...'; Sleep(2000); ExtractZip('files.zip', GetCurrentDir); end; } end; procedure TDownload.SetMaxProgressBar; begin frmoxidemodinstaller.pb1.Max := maxprogressbar; end; destructor TDownload.Destroy; begin FreeAndNil(httpclient); inherited Destroy; end; procedure TDownload.ExtractZip(ZipFile, ExtractPath: string); begin if TZipFile.IsValid(ZipFile) then begin TZipFile.ExtractZipFile(ZipFile, ExtractPath); DeleteFile(ZipFile); DeleteFile('HashInfo.txt'); DeleteFile('OpenSSL License.txt'); DeleteFile('openssl.exe'); DeleteFile('ReadMe.txt'); frmoxidemodinstaller.Caption := 'Done.'; frmoxidemodinstaller.btn1.Enabled := True; end else begin frmoxidemodinstaller.Caption := 'Error Extracting files'; end; end; procedure Tfrmoxidemodinstaller.btn1Click(Sender: TObject); begin Close; end; procedure Tfrmoxidemodinstaller.FormShow(Sender: TObject); var DownloadThread: TDownload; link: string; begin pb1.Position := 0; btn1.Enabled := False; frmoxidemodinstaller.Caption := 'Starting Download...'; link := 'https://bintray.com/oxidemod/builds/download_file?file_path=Oxide-Rust.zip'; DownloadThread := TDownload.Create(true, link, 'oxide.zip'); DownloadThread.FreeOnTerminate := true; DownloadThread.Start; end; end. Here is the form unit I made for UniGUI: (I removed the button) unit uOxideModInstaller; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, uniGUITypes, uniGUIAbstractClasses, uniGUIClasses, uniGUIForm, uniGUIBaseClasses, uniProgressBar, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, System.Zip, ActiveX, IdSSLOpenSSL; type TDownload = class; Tfrmoxidemodinstaller = class(TUniForm) pb1: TUniProgressBar; procedure UniFormShow(Sender: TObject); private { Private declarations } public { Public declarations } end; TDownload = class(TThread) private httpclient: TIdHTTP; url: string; filename: string; maxprogressbar: integer; progressbarstatus: integer; procedure ExtractZip(ZipFile: string; ExtractPath: string); procedure idhttp1Work(ASender: TObject; AWorkMode: TWorkMode; AWorkCount: Int64); procedure idhttp1WorkBegin(ASender: TObject; AWorkMode: TWorkMode; AWorkCountMax: Int64); procedure UpdateProgressBar; procedure SetMaxProgressBar; protected procedure Execute; override; public constructor Create(CreateSuspended: boolean; aurl, afilename: string); destructor Destroy; override; end; function frmoxidemodinstaller: Tfrmoxidemodinstaller; implementation {$R *.dfm} uses MainModule, uniGUIApplication; function frmoxidemodinstaller: Tfrmoxidemodinstaller; begin Result := Tfrmoxidemodinstaller(UniMainModule.GetFormInstance(Tfrmoxidemodinstaller)); end; { Thread } constructor TDownload.Create(CreateSuspended: boolean; aurl, afilename: string); begin inherited Create(CreateSuspended); httpclient := TIdHTTP.Create(nil); httpclient.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(httpclient); httpclient.HandleRedirects := True; httpclient.OnWorkBegin := idhttp1WorkBegin; httpclient.OnWork := idhttp1Work; url := aurl; filename := afilename; end; procedure TDownload.idhttp1Work(ASender: TObject; AWorkMode: TWorkMode; AWorkCount: Int64); begin progressbarstatus := AWorkCount; Queue(UpdateProgressBar); end; procedure TDownload.idhttp1WorkBegin(ASender: TObject; AWorkMode: TWorkMode; AWorkCountMax: Int64); begin maxprogressbar := AWorkCountMax; Queue(SetMaxProgressBar); end; procedure TDownload.Execute; var Stream: TMemoryStream; begin Stream := TMemoryStream.Create; try httpclient.Get(url, Stream); Stream.SaveToFile(filename); frmoxidemodinstaller.Caption := 'Done Downloading. Extracting...'; ExtractZip('oxide.zip', GetCurrentDir); finally Stream.Free; end; end; procedure TDownload.UpdateProgressBar; var ZipFile: string; begin frmoxidemodinstaller.pb1.Position := progressbarstatus; frmoxidemodinstaller.Caption := 'Downloading...'; end; procedure TDownload.SetMaxProgressBar; begin frmoxidemodinstaller.pb1.Max := maxprogressbar; end; destructor TDownload.Destroy; begin FreeAndNil(httpclient); inherited Destroy; end; procedure TDownload.ExtractZip(ZipFile, ExtractPath: string); begin if TZipFile.IsValid(ZipFile) then begin TZipFile.ExtractZipFile(ZipFile, ExtractPath); DeleteFile(ZipFile); DeleteFile('HashInfo.txt'); DeleteFile('OpenSSL License.txt'); DeleteFile('openssl.exe'); DeleteFile('ReadMe.txt'); frmoxidemodinstaller.Caption := 'Done.'; frmoxidemodinstaller.Close; end else begin frmoxidemodinstaller.Caption := 'Error Extracting files'; end; end; procedure Tfrmoxidemodinstaller.UniFormShow(Sender: TObject); var DownloadThread: TDownload; link: string; begin pb1.Position := 0; frmoxidemodinstaller.Caption := 'Starting Download...'; link := 'https://bintray.com/oxidemod/builds/download_file?file_path=Oxide-Rust.zip'; DownloadThread := TDownload.Create(true, link, 'oxide.zip'); DownloadThread.FreeOnTerminate := true; DownloadThread.Start; end; end.
  3. vbdavie

    Download doesn't work - IPAD

    I'm using the Full Demo build 1205. I have an IPAD with Safari and Chrome installed. When I click on the "Download & Upload" then "Advanced Download", I can click on any of the 4 download buttons, but nothing happens. I don't see a visual clue that anythnig has happened. Is there an issue on the IPAD where we can't do the download function? I didn't try with FireFox since it's NOT my IPAD. So, I could only try with Safari and Chrome. Anybody else experience this? Davie
  4. Hi; I was successfully to export and download a datasource content using ZEXMLSS Download XML file and open with excel it works very nice for me. Used Component : ZEXMLSS and ZColorStringGrid from http://avemey.com/index.php?lang=en Turbo power tpabbrevia from http://sourceforge.net/projects/tpabbrevia/?source=dlp You must install a zip component and zcolorstring for exporting. I need some modification ZEXMLSS compatiblity for tpabbrevia manually during installation. Here is sample code which was tested via XE2 PS : sorry for big capital. I am always using big capital writting a program. // Tdosyaver is uniform formname // RAPORHAZIRLA(XFILENAME:STRING); // Prepare data and export it using ZEXMLSS. QLIST is a datasource and opened before this proc. PROCEDURE TDOSYAVER.RAPORHAZIRLA(XFILENAME:STRING); //uses zexmlss, zeodfs, zexmlssutils, zeformula, zsspxml, zexlsx; var XMLSS: TZEXMLSS; i, j: integer; TextConverter: TAnsiToCPConverter; sEOL: string; XSAYI : INTEGER; XSATIR : INTEGER; XCOL : INTEGER; begin TextConverter := nil; {$IFNDEF FPC} {$IF CompilerVersion < 20} // < RAD Studio 2009 TextConverter := @AnsiToUtf8; {$IFEND} {$ENDIF} {$IFDEF FPC} sEOL := LineEnding; {$ELSE} sEOL := sLineBreak; {$ENDIF} XMLSS := TZEXMLSS.Create(nil); try //There are 1 pages in this document XMLSS.Sheets.Count := 1; XMLSS.Sheets[0].Title := 'Sayfa1'; // EXCEL SHEET NAME //Add styles XMLSS.Styles.Count := 1; XMLSS.Styles[0].Font.Size := 10; XMLSS.Styles[0].Font.Name := 'Arial'; XMLSS.Styles[0].Alignment.Horizontal := ZHCenter; // This parameters are optional and some styles options too (line backcolor, text oriantation etc). XMLSS.Styles[0].Alignment.Vertical := ZVCenter; XMLSS.Styles[0].Alignment.WrapText := true; with XMLSS.Sheets[0] do begin //the count of rows and columns // ZEXMLSS must know how many contain rows and cols. You must set this properties before beginging exporting. RowCount := 50; // ColCount := 20; // All Field Names FOR XSAYI:=0 TO QLIST.FIELDS.COUNT-1 DO BEGIN CELL[XSAYI,1].CellStyle:=1; CELL[XSAYI,1].DATA:=QLIST.FIELDS[XSAYI].FIELDNAME; END; // XSATIR:=2; // row. First row contain field XCOL:=0; // we transfer to all records to ZEXMLSS WHILE NOT QLIST.EOF DO BEGIN FOR XCOL:=0 TO QLIST.FIELDS.COUNT-1 DO BEGIN CELL[XCOL,XSATIR].CellStyle:=1; CELL[XCOL,XSATIR].DATA:=QLIST.FIELDS[XCOL].ASSTRING; END; QLIST.NEXT; INC(XSATIR); END; end; finally FreeAndNil(XMLSS); end; end; procedure TDOSYAVER.BTNEXCELClick(Sender: TObject); VAR XFILENAME : STRING; begin XFILENAME:='Report.XML'; XFILENAME:=UniServerModule.LocalCachePath+XFILENAME; RAPORHAZIRLA(XFILENAME); UniSession.sendFile(XFILENAME); end;
×