
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
node-paperclip-file
Advanced tools
This is an npm module that allows node-paperclip to upload files to the file system.
To install
npm install node-paperclip-file --save
Here is an example of a model that uses the mongoose plugin.
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const Paperclip = require('node-paperclip');
const ProfileImage = new Schema({
user_id: { type: Schema.Types.ObjectId, ref: 'User' },
username: String
});
ProfileImage.plugin(Paperclip.plugins.mongoose, {
profile_image: {
avatar: {
before_save: [
],
styles: [
{ original: true },
{ tiny: { width: 50, height: 50, modifier: '#' } },
{ thumb: { width: 100, height: 100, modifier: '#' } },
{ profile: { width: 200, height: 200, modifier: '#' } }
],
prefix: '{{plural}}/{{document.username}}',
name_format: '{{style}}.{{extension}}',
storage: 'file'
// You can pass these options directly and it should work ok or it uses reasonable defaults.
// file: {assets: '', workingDirectory: ''}
}
}
})
module.exports = mongoose.model('ProfileImage', ProfileImage);
If you'd like to contribute a feature or bugfix: Thanks! To make sure your fix/feature has a high chance of being included, please read the following guidelines:
And once there are some contributors, then I would like to thank all of the contributors!
It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.
© 2017 Scott Ballantyne. See LICENSE for details.
FAQs
file storage module for node-paperclip
We found that node-paperclip-file 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.