locked
How to prevent file caching when downloading file by BackgroundDownloader? RRS feed

  • 질문

  • Hi! I am using BackgroundDownloader for download files from remote ftp server.

    StorageFolder ^appLocFolder = ApplicationData::Current->LocalFolder;
    
    Platform::String ^tStr = appLocFolder->Path;
    
    task <StorageFile ^> (appLocFolder->CreateFileAsync (fileName, CreationCollisionOption::ReplaceExisting)).then ([this] (StorageFile ^destinationFile)
    {
    	BackgroundDownloader ^downloader = ref new BackgroundDownloader ();
    			
    	DownloadOperation ^download = downloader->CreateDownload (source, destinationFile);
    
    	download->StartAsync ();
    });

    But it really downloads file directly from server only once. Then the file downloads from cache. How to prevent/disable this behavior?

    I want to download file directly from ftp server each time when I call StartDownload.

    2012년 12월 3일 월요일 오후 2:01

모든 응답

  •  up 
    2012년 12월 4일 화요일 오후 12:02
  • Dont have the nice solution, but was workaround maybe put a random parameter on the query string ?


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    2012년 12월 4일 화요일 오후 1:03
  • Sorry, I didn't understand your reply. Can you explain what did you mean?
    2012년 12월 4일 화요일 오후 1:36
  • if you got the following url http://mywebpage.com/filetodownload.zip you can (mostly) also use tp://mywebpage.com/filetodownload.zip?t=320872

    where the value for t is a random number. So you can bypass the cache


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    2012년 12월 4일 화요일 오후 1:41
  • But I have an ftp request. Like this one "ftp://Polimorfic:klub05468@178.219.84.132/file_to_download.xml".
    2012년 12월 4일 화요일 오후 1:55