Explorar o código

Fix backward compatibility of attachments with v3.3 or earlier

Daisuke Takahashi %!s(int64=2) %!d(string=hai) anos
pai
achega
f44dc4a4e9
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      apps/app/src/server/models/attachment.ts

+ 1 - 0
apps/app/src/server/models/attachment.ts

@@ -38,6 +38,7 @@ export interface IAttachmentModel extends Model<IAttachmentDocument> {
 const attachmentSchema = new Schema({
   page: { type: Types.ObjectId, ref: 'Page', index: true },
   creator: { type: Types.ObjectId, ref: 'User', index: true },
+  filePath: { type: String }, // DEPRECATED: remains for backward compatibility for v3.3.x or below
   fileName: { type: String, required: true, unique: true },
   fileFormat: { type: String, required: true },
   fileSize: { type: Number, default: 0 },