How to upload file to a server from Salesforce?

How can I upload a file using Ruby on Rails to SQL Server 2008?

  • I need to specifically upload the file to be placed in a varbinary(max) column. Hypothetically, a user picks a file from their hard drive and then it is placed in the upload form. Upon submission, the file should be placed in the varbinary(max) column seeing it is a binary file. I cannot use paperclip, carrierwave, or attachment_fu.

  • Answer:

    Have you looked into SQL Server's FileStream for managing BLOB storage?

Shannon Moreland LeVert at Quora Visit the source

Was this solution helpful to you?

Other answers

what you're asking is just a regular insert. so let's say you have a table named MyFileTable you would run: INSERT MyFileTable(FileColumn) VALUES(@FileContent)

Mordechai Danielov

Don't! Regardless of Web framework or database brand do not use a relational database as a file storage. I rarely see any good justification to do so. Avoid storing in the file system as well if you ever intend to horizontally scale your system. If you're restricted by draconian corporate policies, there's no much of an option, I know. If you have doubts, choose a 3rd party solution in the cloud. I recommend Cloudinary.

Fabio Akita

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.