SlickUpload
Welcome Guest Search | Active Topics | Log In | Register

How to rename uploading files and cahnge path Options
manoj.jangid@dotsquares.com
#1 Posted : Thursday, October 20, 2011 2:43:43 AM
Rank: Newbie

Groups: Registered

Joined: 10/19/2011
Posts: 4
Location: india

Hi Chrish,

 

I get this error when I inhereted this class RenameFiles from FileUploadStreamProvider.

 

"'Krystalware.SlickUpload.Storage.FileUploadStreamProvider' does not contain a constructor that takes 0 arguments"

 

below is my code snipet.

 

public class RenameFiles : FileUploadStreamProvider
{



    public override IEnumerable<string> GetRenameSequence(string fileName)
    {
        string newName = new Guid().ToString() + fileName;
        return base.GetRenameSequence(newName);
    }
}

 

Can you suggest me some thing on this ?

 

Thanks

 

 

Axosoft
#2 Posted : Thursday, October 20, 2011 11:54:09 AM
Rank: Administration


Groups: Administrators

Joined: 7/7/2005
Posts: 1,586
Location: Scottsdale, AZ

Sure. You need to add a constructor that takes an UploadStreamProviderElement and passes it to the base class. Something like this:

 

public RenameFiles(UploadStreamProviderElement settings) :
    base(settings)
{ }

 

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.