Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
strapi-provider-upload-azure-sftp
Advanced tools
Readme
Strapi plugin for file uploading to Azure storage and SFTP.
Inside your strapi project run the following
yarn add strapi-provider-upload-azure-sftp
# or
npm install strapi-provider-upload-azure-sftp
You will need to extend the file model for having two URL keys, url and urlAzure. For this, copy the File.settings.json from node_modules/strapi-plugin-upload/models to extensions/upload/models and add urlAzure to the attribute list
...
"url": {
"type": "string",
"configurable": false,
"required": true
},
"urlAzure": {
"type": "string",
"configurable": false
},
...
With a stable release of Strapi 3.0.0, the configuration was moved to a JavaScript file. Official documentation here.
To enable the provider, create or edit the file at ./config/plugins.js
.
This is an example plugins.js file for Azure storage:
module.exports = ({ env }) => ({
upload: {
provider: 'azure-sftp',
providerOptions: {
//AZURE CONFIG
account: CSTORAGE_ACCOUNT'),
accountKey: env('STORAGE_ACCOUNT_KEY'),
serviceBaseURL: env('STORAGE_URL'),
containerName: env('STORAGE_CONTAINER_NAME'),
defaultPath: 'files',
maxConcurrent: 10
//SFTP CONFIG
host: env('HOST'),
port: env('PORT'),
user: env('USER'),
password: env('PASSWORD'),
basePath: env('BASE_PATH'),
baseUrl: env('BASE_URL')
}
}
});
serviceBaseURL
is optional, it is useful when connecting to Azure Storage API compatible services, like the official emulator Azurite. serviceBaseURL
would then look like http://localhost:10000/your-storage-account-key
.
When serviceBaseURL
is not provided, default https://${account}.blob.core.windows.net
will be used.
If the file object which the provider receives from Strapi have a field private: true the file won't be uploaded to the SFTP and url and urlAzure will have the same URL
This project is licensed under the MIT License - see the LICENSE.md file for details
FAQs
Strapi plugin for file uploading to Azure storage and SFTP.
The npm package strapi-provider-upload-azure-sftp receives a total of 3 weekly downloads. As such, strapi-provider-upload-azure-sftp popularity was classified as not popular.
We found that strapi-provider-upload-azure-sftp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.