Resolved: OnFileNameDetermining

Nov 20, 2010 at 9:33 AM

Using the following code:

<script runat="server">
private void ConfirmUpload(object sender, ConfirmUploadEventArgs e)
    // if you don't want to do anything on the server 
    // just leave it empty

private void FileUploader1_FileNameDetermining(object sender, FileNameDeterminingEventArgs e)
    // set the filename here
    // you can also use e.File - HttpPostedFile object

    Random r = new Random();

    String OverwriteFileName = r.Next(10000).ToString()+DateTime.Now+e.FileName;
    OverwriteFileName.Replace(" ","_");
    OverwriteFileName.Replace("-", "");
    OverwriteFileName.Replace(":", "");

    e.FileName = OverwriteFileName;
<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
    <fjx:FileUploader ID="FileUploader1" runat="server" 
            BucketName="test"  />
The file uploads, but is it not renamed. Any ideas?

Nov 20, 2010 at 10:35 AM

Fixed: I had the parameters in the FileUploader tag instead of the DirectAmazonUploader tag