none
Can we store file data to SQL without streaming on server?

    Question

  • Hi Team,

    I need to store file(s) to SQL without streaming / reading at Server. I have created a Web API with AngularJS and SQL.

    e.g. 

    var fileType = httpRequest.Files[file].ContentType;
            var fileStrm = httpRequest.Files[file].InputStream;
            var fileSize = httpRequest.Files[file].ContentLength;
            byte[] fileRcrd = new byte[fileSize];
            var file_Name = Path.GetFileName(filePath);
            fileStrm.Read(fileRcrd, 0, fileSize);

    Is it possible to send file data to SQL (in bytes) without streaming / reading at server? I don't want to put a load on server for large files. just read  the data and send them to SQL where SQL will do the streaming and store data as varbinary.

    Do let me know if this is possible or not? If so it please share the information.

    • Edited by Pallav Sheth Wednesday, October 14, 2015 12:38 PM Additional information
    Wednesday, October 14, 2015 12:32 PM

Answers

All replies