This commit is contained in:
@@ -228,7 +228,7 @@ namespace AyaNova.Util
|
||||
{
|
||||
LogUpdateMessage(log);
|
||||
|
||||
exec("CREATE TABLE afileattachment (id BIGSERIAL PRIMARY KEY, ownerid bigint not null," +
|
||||
exec("CREATE TABLE afileattachment (id BIGSERIAL PRIMARY KEY, " +
|
||||
"attachtoobjectid bigint not null, attachtoobjecttype integer not null, " +
|
||||
"storedfilename text not null, displayfilename text not null, contenttype text, notes text)");
|
||||
|
||||
|
||||
@@ -256,11 +256,10 @@ namespace AyaNova.Util
|
||||
/// <param name="tempFilePath"></param>
|
||||
/// <param name="contentType"></param>
|
||||
/// <param name="fileName"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="attachToObject"></param>
|
||||
/// <param name="ct"></param>
|
||||
/// <returns></returns>
|
||||
internal static FileAttachment storeFileAttachment(string tempFilePath, string contentType, string fileName, long userId, AyaTypeId attachToObject, AyContext ct)
|
||||
internal static FileAttachment storeFileAttachment(string tempFilePath, string contentType, string fileName, AyaTypeId attachToObject, AyContext ct)
|
||||
{
|
||||
//calculate hash
|
||||
var hash = FileHash.GetChecksum(tempFilePath);
|
||||
@@ -286,7 +285,6 @@ namespace AyaNova.Util
|
||||
//Build AyFileInfo
|
||||
FileAttachment fi = new FileAttachment()
|
||||
{
|
||||
OwnerId = userId,
|
||||
StoredFileName = hash,
|
||||
DisplayFileName = fileName,
|
||||
Notes = string.Empty,
|
||||
|
||||
Reference in New Issue
Block a user