![]() Show-UDToast -Message "will now redirect to new window with: $($cache:cfgSiteRootURL.TrimEnd('/'))/ftp_downloads/$downloadFolderRandomNumber/$($Item.Name)" -Duration 7500 Show-UDToast -Message "download result side= $($session:FTPFileDownload.Side)" -Duration 7500 Show-UDToast -Message "download result destination= $($session:FTPFileDownload.Destination)" -Duration 7500 Show-UDToast -Message "download result error= $($session:FTPFileDownload.Error)" -Duration 7500 } Until ((Test-Path -Path "$($session:ftpSpecificParams.LocalDownloadFolder)\$($Item.Name)") -Or ($timeout -gt 10)) ^^^ This works ok tested against a local FTP server where the download happens quickly, but when I test against an international FTP server with the download taking a few seconds longer - the modal displays, the file downloads successfully to the published folder, the modal is hidden, but the Invoke-UDRedirect doesn’t seem to work?īut if I manually open the link like: in a browser tab, the file downloads to the local PC ok.ĭoes anyone have any ideas? Or perhaps a different way for the download from the published folder to be fired? $session:FTPFileDownload = FTP-WinSCP -Message "wait until file exists: $($session:ftpSpecificParams.LocalDownloadFolder)\$($Item.Name)" -Duration 7500 Once downloaded, I hide the modal and use Invoke-UDRedirect -url "pathToFileInPSUpublishedFolder" -OpenInNewWindow which opens the file in a new tab or saves it to the user’s local PC depending on whether it’s a file that the browser can display. I show a modal “downloading…” and looping until the file exists in the published folder. ![]() I’ve added a download button to the list of files (which are in a UDTable), which calls an FTP download request (using WinSCP) to save the file to a unique folder on the web server which is in a “PSU published folder”. I want users to be able to download the files to their PC. I’ve created a dashboard page that connects to an FTP server and lists the folders and files. Just wondering if anyone has some ideas here. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |