Socket
Socket
Sign inDemoInstall

@file-storage/core

Package Overview
Dependencies
2
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.3 to 1.1.4

2

dist/file-storage.js

@@ -69,3 +69,3 @@ "use strict";

try {
const driver = drivers.find((item) => item['driverName'] === diskConfig.driver);
const driver = drivers.find((item) => item && item['driverName'] === diskConfig.driver);
return new driver(diskConfig);

@@ -72,0 +72,0 @@ }

{
"name": "@file-storage/core",
"version": "1.1.3",
"version": "1.1.4",
"description": "> TODO: description",

@@ -38,3 +38,3 @@ "author": "Dang Nguyen <haidang009@gmail.com>",

},
"gitHead": "ecd35677ca09cd5df9e414915d3c4fabc5ec6b5a"
"gitHead": "291ff2b4c911fc966aad489b394d231927c2f4a7"
}

@@ -11,3 +11,3 @@ ```

A simple abstraction to interact with file system inspired by [Laravel File System](https://laravel.com/docs/8.x/filesystem), provides one interface for many kind of drivers: `local`, `ftp`, `sftp`, `Amazon S3`, and `Google Cloud Storage`, even your custom driver.
A simple abstraction to interact with file system inspired by [Laravel File System](https://laravel.com/docs/8.x/filesystem), provide one interface for many kind of drivers: `local`, `ftp`, `sftp`, `Amazon S3`, and `Google Cloud Storage`, even your custom driver.

@@ -85,5 +85,6 @@ ## Installation

## Hash file name
## Unique file name
Enable hash file name to prevent a file get replaced when uploading same file (or same name):
Enable unique file name to prevent a file get replaced when uploading same file (or same name).
The unique name generated by `uuid` to secure your file path.

@@ -93,6 +94,6 @@ ```javascript

...
enableHash: true,
uniqueFileName: true,
});
// The path uploaded will be like this: /path/to/image/my-image_$ru6eu3.png
// The uploaded path could be like this: /path/to/e8a3e633-fc7f-4dde-b7f0-d2686bcd6836.jpeg
```

@@ -144,3 +145,3 @@

If you want to upload image and also creates many diferent sizes: large, medium, small, thumbnail for web resonsive, install this package, it is acting as a plugin, will generates those image sizes automatically:
If you want to upload image and also creates many diferent sizes for web resonsive, install this package, it is acting as a plugin, will generates those image sizes automatically:

@@ -151,3 +152,3 @@ ```bash

**HINT**: `Image manipulation` only available on Starage facade, If you obtain a specific disk instance, set the second parameter to true to obtain a storage instance insteads:
**HINT**: `Image manipulation` only available on Storage facade, If you obtain a specific disk instance, set the second parameter to `true` to obtain a storage instance insteads:

@@ -160,3 +161,3 @@ ```javascript

- [ ] Create interface for all result (Need same result format for all drivers).
- [x] Create interface for all result (Need same result format for all drivers).
- [x] Refactor `customDrivers` option: provides disk defination is enough.

@@ -167,2 +168,3 @@ - [ ] Implement GCS disk.

- [ ] Remove `customDrivers` option, pass custom driver class directly to `diskConfigs.driver`.
- [x] Unique file name.

@@ -169,0 +171,0 @@ ## License

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc