• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to prevent NSURLDownload from changing my file's name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to prevent NSURLDownload from changing my file's name


  • Subject: How to prevent NSURLDownload from changing my file's name
  • From: Marc Respass <email@hidden>
  • Date: Wed, 21 Oct 2009 14:17:07 -0400

Hi All,

I have searched and can't find an answer to this. I am using NSURLDownload in an internal application. I connect to a server and download some files. Many times, the file name gets changed. I download file.xslt but the download system turns it into "file.xslt.xml" and then my app can't find it. Is there any way of preventing that?

I modified my download delegate to check for known file types and fix the name but new types are showing up so that's not a good solution. What I am doing now is, in download:decideDestinationWithSuggestedFilename:, to keep checking for an extension and then put the last one back on so I can keep the original filename. That seems kind of hackish but I don't know another way to do it.

Thanks a lot
Marc
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to prevent NSURLDownload from changing my file's name
      • From: Jeff Johnson <email@hidden>
  • Prev by Date: Cocoa Autosizing Control
  • Next by Date: Re: Cocoa Autosizing Control
  • Previous by thread: Re: Cocoa Autosizing Control
  • Next by thread: Re: How to prevent NSURLDownload from changing my file's name
  • Index(es):
    • Date
    • Thread