Upload and replace existing file

Posted by Community Admin on 04-Aug-2018 18:44

Upload and replace existing file

All Replies

Posted by Community Admin on 20-Jun-2012 00:00

Hi,
I am trying to upload a file in sitefinity library using code. Below is the method which I am using

UploadFile(byte[] buffer, string fileName, string fileExtension, string mimeType, long streamLength, ILibrary library, bool overwrite)

My requirement is to  replace file by keeping the same GUID. But this method might be removing the old file and adding a new file and creating a new GUID which is breaking the site where ever I am referring the file.

Is there any method which I can use to reupload a file for the same GUID?
 

This thread is closed