alchemy-media 0.9.0-alpha → 0.9.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.9.0-alpha.2 (2024-02-19)
2
+
3
+ * Add `getFile()` method to `MediaFile` and `MediaRaw` documents
4
+
1
5
  ## 0.9.0-alpha.1 (2024-02-15)
2
6
 
3
7
  * Upgrade to Alchemy v1.4.0
@@ -254,4 +254,17 @@ MediaFile.setMethod(function addFile(file, options, callback) {
254
254
  });
255
255
 
256
256
  return pledge;
257
+ });
258
+
259
+ /**
260
+ * Get a Inode.File instance
261
+ *
262
+ * @author Jelle De Loecker <jelle@elevenways.be>
263
+ * @since 0.9.0
264
+ * @version 0.9.0
265
+ *
266
+ * @return {Alchemy.Inode.File}
267
+ */
268
+ MediaFile.setDocumentMethod(function getFile() {
269
+ return new Classes.Alchemy.Inode.File(this.path);
257
270
  });
@@ -557,4 +557,17 @@ MediaRaw.setMethod(function getPathFromId(objectId) {
557
557
  filePath = path.resolve(this.basePath, year, month, String(objectId));
558
558
 
559
559
  return filePath;
560
+ });
561
+
562
+ /**
563
+ * Get a Inode.File instance
564
+ *
565
+ * @author Jelle De Loecker <jelle@elevenways.be>
566
+ * @since 0.9.0
567
+ * @version 0.9.0
568
+ *
569
+ * @return {Alchemy.Inode.File}
570
+ */
571
+ MediaRaw.setDocumentMethod(function getFile() {
572
+ return new Classes.Alchemy.Inode.File(this.path);
560
573
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "alchemy-media",
3
3
  "description": "The media plugin for Alchemy",
4
- "version": "0.9.0-alpha",
4
+ "version": "0.9.0-alpha.2",
5
5
  "repository": {
6
6
  "type" : "git",
7
7
  "url" : "https://github.com/11ways/alchemy-media.git"