You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem I have is that I am using nodejs v18.0.0, I have already used skipper-gridfs on other occasions and it works perfectly, the difference is that I have used node v12 or node v14 but this time this version of node is necessary, it is worth mentioning that the I create fs.files collections automatically and fs.chunks I create them manually but it only inserts them into f.chunks. I share my code:
`/**
SolicitudController
@description :: Server-side actions for handling incoming requests.
I have already reviewed permissions, the connection string, I have changed the version of skipper-gridfs to a lower one, currently this is the configuration I have:
sailsjs:1.5.2
mongodb:4.2.0
skipper-gridfs: 1.0.2
Likewise, in the endpoint in postman there is POST /upload
header: Content-Type: multipart/form-data
body: form-data
key:file
value: my_file.pdf
The text was updated successfully, but these errors were encountered:
The problem I have is that I am using nodejs v18.0.0, I have already used skipper-gridfs on other occasions and it works perfectly, the difference is that I have used node v12 or node v14 but this time this version of node is necessary, it is worth mentioning that the I create fs.files collections automatically and fs.chunks I create them manually but it only inserts them into f.chunks. I share my code:
`/**
*/
const get_file = function(blob, fd) {
return new Promise((resolve, reject) => {
blob.read(fd, function(error , file) {
if(error) {
return reject(error);
}
return resolve(file);
});
});
}
module.exports = {
uploadFile: async(request, response)=>{
request.file('archivo').upload({
adapter: require('skipper-gridfs'),
uri: 'mongodb://127.0.0.1:27017/partidas_presupuestales'
}, function (err, filesUploaded) {
if (err) return response.serverError(err);
return response.ok();
});
},
viewdocument: async function( request, response ){
const blobAdapter = require('skipper-gridfs')({
};
`
I have already reviewed permissions, the connection string, I have changed the version of skipper-gridfs to a lower one, currently this is the configuration I have:
sailsjs:1.5.2
mongodb:4.2.0
skipper-gridfs: 1.0.2
Likewise, in the endpoint in postman there is POST /upload
header: Content-Type: multipart/form-data
body: form-data
key:file
value: my_file.pdf
The text was updated successfully, but these errors were encountered: