Keep original attachment name when copying attachments

Keep original attachment name when copying attachments

Postby ehavemann » Fri Apr 22, 2011 10:59 pm

I have a content filtering rule to copy all attachments to a particular folder for a particular user. The problem is that AMS prepends the attachment filename with random numbers (presumably to make sure the filenames remain unique). In this case, this behavior is not desirable - I want the original attachment name as submitted to be the one copied to the destination folder. Is this possible?
ehavemann
 
Posts: 26
Joined: Fri Dec 14, 2007 6:15 pm

Re: Keep original attachment name when copying attachments

Postby Code Crafters » Mon Apr 25, 2011 12:02 pm

The names are currently decided by AMS to avoid name conflicts. I believe the random numbers may be the datetime or if not may just be random. One solution would be to write a custom application to rename the files if you have any developers at your disposal but if not I'll forward your request for consideration in a future update. We're overhauling the content filtering system in a new major version anyway so I'll also consider changing the behaviour here as I'm the developer in charge of re-writing the filtering systems.
Code Crafters
 
Posts: 933
Joined: Mon Sep 10, 2007 2:35 pm

Re: Keep original attachment name when copying attachments

Postby ehavemann » Thu Apr 28, 2011 10:18 pm

The first twelve digits of the attachment filename is the date/time in YYYYMMDDHHSS format, followed by seven seemingly random numbers and an underscore, then followed by the original filename. I already wrote an application to strip these 20 prepended characters from the attachment name as part of some additional processing required for the file, so I'll do the same thing here for now. But it would be very useful to be able to control this behavior directly within AMS. Maybe add some additional options to control conflict behavior (destination file already exists etc.).
ehavemann
 
Posts: 26
Joined: Fri Dec 14, 2007 6:15 pm

Re: Keep original attachment name when copying attachments

Postby Code Crafters » Sat Apr 30, 2011 12:40 pm

I'll forward your suggestion to the team. Lucky that you were able to write a simple app to rename the files for you for now though. You can trigger this application using content filtering as I'm sure you already are doing.
Code Crafters
 
Posts: 933
Joined: Mon Sep 10, 2007 2:35 pm


Return to General

Who is online

Users browsing this forum: No registered users and 12 guests

cron