Forum OpenACS Development: Re: Attachments and acs-mail-lite
4: Re: Attachments and acs-mail-lite (response to 3)
Posted by Ryan Gallimore on 10/18/11 05:32 PM
Emma, do you think it is reasonable to include the extension period and alter the unique numbering from something like file.pdf_2 to file-2.pdf?
This would solve the problem of opening attachments in some e-mail clients.
5: Re: Attachments and acs-mail-lite (response to 4)
Posted by Emmanuelle Raffenne on 10/18/11 05:35 PM
It's better than modifying the extension IMO.
6: Re: Attachments and acs-mail-lite (response to 5)
Posted by Dave Bauer on 10/18/11 05:39 PM
Yes, you need to split the filename and extension, then generate the unique filenames then put the extension back on.
text_to_url doesn't care about extensions since it just generates a unique URL which doesn' need one, so reusing for this purpose requires some extra logic.