My favorites | Sign in
Project Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 25: File extension inappropriately renamed to .VCF
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by jeremy114, Mar 05, 2009
I have successfully used SKPSMTPMessage to attach files and communicate
with Gmail SMTP servers.  I am, however, experiencing a strange side
affect.  When I download the file from the email, on a Mac the file gets
renamed to the .VCF file extension, even though the actual file is a
different extension (.txt, .csv, etc.).  It seems like Mac OS is actually
renaming the file, because in my email client, the file extension looks
right.  Also, downloading on a PC works just fine.  

I have debugged literally the entire code path that executes when the
message is sent, and everything seems to be in order.  Is there some
metadata that gets associated with the attached file that is not correct?  

Thanks in advance for any help.

Jeremy

Comment 1 by jeremy114, Mar 05, 2009
In addition to the information above, I would like to add that if anyone is willing
to help me on this, I can forward the email with the attachment. Thanks.

Jeremy
Comment 2 by mchar...@iapphealth.com, Mar 08, 2009
I removed the VCF and just set the parameters from the xib controller. It worked 
fine.
Comment 3 by heskor, Mar 10, 2009
I have the exact same problem as Jeremy. Works fine on PC, but on my Mac the CAF-files I sent got a .vcf-
ending. For txt and jpg-files it did not get the .vcf-ending.
Comment 4 by heskor, Mar 11, 2009
To add some more information, it seems to happen to just some file types. I tried today with AIFF and AIFC and it 
worked fine, but i still got vcf on the caf-file
Comment 5 by svguerin3, Jul 15, 2009
Has anyone found a way around this?  My app uses this to send PDF files, and it adds the VCF extension only 
under certain circumstances (one of which is the iPhone's email app, and another being hotmail on a Mac 
computer).  Thoughts?

I'm desperate for a solution, as it's upsetting quite a few users.  Thanks!!
Comment 6 by bullale, Sep 10, 2009
Look in the code for the dictionary of the file attachment part.
For the key kSKPSMTPPartContentTypeKey, the first part of the string defines the content-type of the 
attachment. If you leave this as text/directory, then Macs will think it is a directory-type file because Macs 
largely ignore the file extension. Change the line to the content-type it is supposed to be.
http://en.wikipedia.org/wiki/Internet_media_type#List_of_common_media_types

Sign in to add a comment

Hosted by Google Code