AGL Posted October 20, 2011 Posted October 20, 2011 Hi. Thanks for your work. The problem occurs when working with the server IIS5, IIS7. In the server standalone mode - file is downloaded successfully. In brouser, i see error message: "File C:\WebIIS\cache\Start\IotspPxPNzKtXGn\?????.txt not found". verify is possible by modifying the example in a folder: "Demos\DownloadDemo\" procedure TMainForm.UniButton2Click(Sender: TObject); var FName : string; begin // FName:='demo'+FormatDateTime('hhnnss', Time)+'.txt'; FName:='текст.txt'; UniMemo1.Lines.SaveToFile(UniServerModule.LocalCachePath+FName); UniLabel1.Caption:='<a href="'+UniServerModule.LocalCacheURL+FName+'" target=new>Click here to download: ('+FName+')</a>'; end; how can I fix this? Quote
zilav Posted October 20, 2011 Posted October 20, 2011 А при чем тут унигуи? Пользователь давит на ссылку с файлом и обработка запроса идет через IIS минуя унигуи, так что копать надо в ту сторону. Quote
ibandyop Posted October 20, 2011 Posted October 20, 2011 When using TUniFileUpload Create your own folder do not use UniGui.LocalFilePath, ie. DestFolder:=UniServerModule.StartPath+'UploadFolder\'; Copy file to UploadFolder from UploadComplete to CopyFile(PChar(AStream.FileName), PChar(DestName), False); Please change direction of slashes from \ to / and use HTTP url format and read http://{url}/Uploadfolder/FName . url should be manually defined to allow domain name in future etc. Quote
Administrators Farshad Mohajeri Posted October 20, 2011 Administrators Posted October 20, 2011 Delphi version? Quote
AGL Posted October 21, 2011 Author Posted October 21, 2011 А при чем тут унигуи? Я конечно догадался, что они тут не причем. Вопрос решил сюда запостить т.к. в унигуи сейчас вожусь. Вдруг укого были грабли такие. When using TUniFileUpload Thanks, I know, how to use TUniFileUpload. Delphi version? D2010 I know, what the problem is not unigui, in intraveb-components present a similar problem, but maybe someone know how to fix it. Now, I see two possible solutions. - transliterate file names. - create ftp-server and create download-links in TUniMemo to ftp-server. Quote
Administrators Farshad Mohajeri Posted November 4, 2011 Administrators Posted November 4, 2011 So is this a problem with 2010 only? I mean is this issue resolved in Delphi XE? Quote
maxpetruk Posted September 2, 2012 Posted September 2, 2012 Hello, I have the same problem with IIS6 and Delphi2010. How to solve the problem, may be some body can help me? Additiolly it error when I downloading files which have 4 symbols type file (for example file_name.docx) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.