Jump to content

Search the Community

Showing results for tags 'SendFile'.

  • 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
    • General Development
    • uniGUI Releases & Roadmaps
    • Utilities
  • Mobile Platform
    • uniGUI Mobile
    • Mobile Browsers
  • Users Area
    • Sample Projects
    • Components and Code Samples
    • Third Party Components
  • 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 7 results

  1. Hello boss, Good afternoon. need your help. Step1: If you use sendfile directly, only 5 files will be downloaded at most at a time. xls.Open(xltFile); xls.ActiveSheet := 1; report.AddTable('DJMX', mt10); if UniChk_pic_show.Checked then report.SetUserFunction('PHOTO', TPhotoUserFunction.Create) else report.SetValue('PHOTO', ''); report.Run(xls); filename := '订单材料表-'+mtCSJC.FieldByName('CSJC').AsString+' '+FormatDateTime('YYYY-MM-DD',Date()); xlsFile := AServerModule.NewCacheFileUrl(False, 'xlsx', MakeFileName(filename), '', fileUrl, True); xlsFile := xlsFile.Trim; xls.Save(xlsFile); //if FileExists(xlsFile) then UniSession.SendFile(xlsFile); // If you use sendfile directly, only 5 files will be downloaded at most at a time Step2: I was prepared one filelist , to prepare for download multi file at once. xls.Save(xlsFile); //if FileExists(xlsFile) then UniSession.SendFile(xlsFile); xlsFileList.Add(xlsFile); // to prepare for download multi file at once Step3: Batch download files. if xlsFileList.Count>0 then begin for i := 0 to xlsFileList.Count-1 do begin if FileExists(xlsFileList[i]) then begin UniSession.SendFile(xlsFileList[i]); Sleep(100);//等待文件发送到客户端,间隔100毫秒 end; end; xlsFileList.Clear; end; Step4: I tried using ttask. if xlsFileList.Count>0 then begin for i := 0 to xlsFileList.Count-1 do begin if FileExists(xlsFileList[i]) then begin //UniSession.SendFile(xlsFileList[i]); //Sleep(100);//等待文件发送到客户端,间隔100毫秒 TTask.Run( procedure begin UniSession.SendFile(xlsFileList[i]); UniSession.AddJS('console.log("'+datetimetostr(Now)+',start run SendFile: '+(i+1).ToString+'")'); end ); end; end; xlsFileList.Clear; end; Or: if xlsFileList.Count>0 then begin for i := 0 to xlsFileList.Count-1 do begin if FileExists(xlsFileList[i]) then begin //UniSession.SendFile(xlsFileList[i]); //Sleep(100);//等待文件发送到客户端,间隔100毫秒 TTask.Run( procedure begin TThread.Synchronize(nil, procedure begin UniSession.SendFile(xlsFileList[i]); UniSession.AddJS('console.log("'+datetimetostr(Now)+',start run SendFile: '+(i+1).ToString+'")'); end ); end ); end; end; xlsFileList.Clear; end; But nothing!!! There is no effect at all. Is it not possible to use multithreading? Requesting help, looking forward to reply, Thanks in advance. ------------------------------------------------------------------------------------------------------------------------------------------------------ Env ref: code case.txt
  2. Hi. I can't upload a plural number of files - the upload code on the backend works correctly, but it is killed by a function on JS: For example, I am trying to issue 7 files for downloading.. Everything is "OK" here - 7 times this code is executed perfectly. But inside Unisession.sendStream, the _sdl_ function is called, the number of files is cut to 5 in it. The _sdl_ function removes elements from the array... As a result, instead of 7 files, only 5 are uploaded.. How can I increase this limit (without changing the source code of the framework)? V: pro 1564
  3. столкнулся с проблемой, не отрабатывает метод сессии SendFile. Сделал все как в примерах. Ничего не происходит при вызове метода UniSession.SendFile(FileName)
  4. Hi everyone I have to send to client a CSV, more or less 100 MB, but I see something strange: the received file is shorter respect the file I send, a lot of row are not present. it's like if a 'flush' is missing. Do unisession.sendfile have some limitation? Tip? tnks (unigui 1.90.0.1514, chrome >=73)
  5. реально ли использовать в приложении компоненты TOpenDialog и TSaveDialog??? Столкнулся с проблемой отображения диалогового окна
  6. If I use SendFile twice or more with the same filename, the browser takes the file out of the cache instead the new one. At the moment I add a Timestamp to the filename, but is there a way to do without a unique name?
  7. My Application should have a procedure which downloads mult files about 100, each file size is about 20mb. I want to show progress while dowonloading. For example, UniProgreesBar1.Max := 100; for N := 1 to 100 do begin Unisession.SendFile("FileName" + IntToStr(N)); UniProgreesBar1.Position := N; Application.ProcessMessages; end; However, this coding does not work. UniProgressBar does not show the progress. What should I do to show the progress? Best Regards.
×
×
  • Create New...