문제

몇 달 동안 단순한 위치를 사용해 왔으며 처음으로 데이터베이스에 이미지/문서를 업로드하고 저장해야합니다.

내 수업은 다음과 같이 보입니다.

public class Document: ObjectMetaData
{
    public string FileName { get; set; }
    public Guid UserId { get; set; }
    public DocumentType DocumentType { get; set; }
    public string DocumentLocation { get; set; }
    public byte[] DocumentData { get; set; }
}

public enum DocumentType
{
    EmploymentContractSigned = 1,
    EmploymentContractUnSigned = 2
}

DB에 데이터를 지속하면 Subonic은 "DocumentData"를 무시합니다.

그렇다면 파일을 DB에 어떻게 저장합니까?

  • documantdata = file.readallbytes ( "somefile.doc")
도움이 되었습니까?

해결책

Github에 대한 답변을 찾았으며,이 문제는 나중에 릴리스 중 하나에서 해결되었습니다. http://github.com/inbox/555338#reply

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top