Questions tagged [sails-skipper]
27 questions
0
votes
1 answer
Uploading images to SailsJS (via Skipper) and resizing with sharp on stream
I can upload images via skipper and then resize them with sharp but it seems inefficient to me because skipper documentation outlines that file streams can be used for image thumbnailing before file upload.
Can I use sharp module to resize images on…

plasticcocoa
- 59
- 5
0
votes
1 answer
Sailsjs permission denied creating folder when uploading a file
I have tried to run function to upload the file to the assets folder in the server. It work on my mac, but when I run it on CentOS 7 server, the error of mkdir permission denied occured.
req.file('avatar').upload({
dirname:…

Zuzu Softman
- 468
- 4
- 15
0
votes
1 answer
Save Image URL to the User in SailsJS
I'm creating an api using Sails JS v1.0.0
I have an action to upload an image to the server and it's working great but the problem I'm having is that I want to save the image URL to the user uploaded the image. It's the user profile image.
The code…

Abdul-Elah JS
- 685
- 1
- 16
- 36
0
votes
1 answer
Write buffer results in path error when uploading a stream with Skipper and Sails
I have converted an upload and stored this as a buffer. When I write this buffer I get a path error.
TypeError: path must be a string or Buffer
const adapter = require('skipper-better-s3')(options);
var receiver = adapter.receive({dirname:…

Eli Peters
- 406
- 4
- 10
0
votes
1 answer
SailsJS skipper-s3 docs suggests S3 bucket should be in US standard - but no such region in S3 UI
Referring to the SailsJS Skipper-S3 doc here: http://sailsjs.com/documentation/concepts/file-uploads/uploading-to-s-3 the box says:
Please note that your Amazon S3 bucket must be created in the 'US Standard' region. If you fail to do so, you will…

Rakib
- 12,376
- 16
- 77
- 113
0
votes
1 answer
How to delete uploaded file in Sailsjs (req.file)?
In Sails.js, one could receive an uploaded file as such:
myControllerAction: function(req, res) {
req.file('avatar', function(err, uploadedFiles) {
// uploaded avatar image will be available here
console.log(uploadedFiles[0]);
…

nbkhope
- 7,360
- 4
- 40
- 58
0
votes
1 answer
Error using custom Skipper body parser configuration
I'm using sails version 0.10.5. I have the bodyParser set like so in http.js:
bodyParser: require('skipper')({
limit: 52428800
})
And I keep getting this error when starting the server:
error: TypeError: Cannot read property 'toLowerCase' of…

KVISH
- 12,923
- 17
- 86
- 162
0
votes
1 answer
How Do You Set S3 Caching On Sails JS & Skipper?
I've got an application written in Sails JS.
I want to set caching for my S3 files.
I'm not really sure where to start, do I need to do something with my Image GET function? Has anyone had any experience on setting caching for S3 assets?
This Is…

steph
- 169
- 2
- 7
0
votes
1 answer
Increase sails bodyP
In my app (sails 0.12.0) I want to extend a limit of bytes send upon POST request. So I've followed the comments in this stackoverflow question
var skipper = require('skipper');
skipper.limit = 1024*1024*100;
middleware: {
bodyParser:…

Danis
- 1,978
- 3
- 16
- 27
0
votes
1 answer
SailsJS skipper uploading files as root, how do I upload as the app's owner?
I'm using skipper to upload images and the images keep uploading as being owned by root, not the desired outcome. The sails app is in a sub-folder in user X's home directory, in which all files are owned by user X. I am running "sudo sails lift" to…

Andrew Rockwell
- 444
- 6
- 13
0
votes
1 answer
how to stream upload that isn't multipart in sailsjs
I've just read through the documentation of sails-skipper. Looks like a good way of handling multipart file uploads.
However, what if I want to stream an upload of something that isn't a multipart payload? -- in my current case its a simple…

shaunc
- 5,317
- 4
- 43
- 58
0
votes
0 answers
Sails skipper timeout while uploading
So, I have a simple controller with method upload:
upload: function (req, res) {
req.file('fileName').upload(function (err, uploadedFile) {
res.json({err: err, uploadedFile: uploadedFile});
});
}
Everything works perfect, until I…

hlozancic
- 1,489
- 18
- 31