Comments (11)
By the way, Thanks for the quick reply and this fabulous library
from meteor-files.
@wanchopeblanco full stack trace please with debug
turned on
from meteor-files.
Thisis what i get on client
Meteor.Files Debugger: [remove([object Object])]
files.coffee:758 Meteor.Files Debugger: [insert()]
files.coffee:803 Meteor.Files Debugger: Connection established continue() upload
debug.js:41 Error invoking Method 'MeteorFileUnlink9b7534345192d71efbfeb0a333fe42deb50e466382219d2bf904a0220380f3ad': Internal server error [500]
files.coffee:844 insert: 972.649ms
files.coffee:1128 Meteor.Files Debugger: [link()]
files.coffee:1128 Meteor.Files Debugger: [link()]
This is on server
Meteor.Files Debugger: [findOne(GP993GjiEeAYkK6oF)]
I20151204-14:52:02.380(-5)? Meteor.Files Debugger: [download([object Object], original)]
I20151204-14:52:02.380(-5)? Meteor.Files Debugger: [download([object Object], original)] [200]: /Users/pmogollon/uploads/assets/app/uploads/images/zwvVefxPzpqCnaxTW.jpg
This is the code from where i call the remove function
var postId = this._id;
Images.remove({'meta.postId': postId, 'meta.type': 'image', 'meta.document':'product'});
_.each(event.currentTarget.files, function(file){
Images.insert({
file: file,
meta: {
postId: postId,
type: 'image',
document: 'product',
},
onUploaded: function(error, fileObj){
if(!error){
Meteor.call('resampleProductImage', fileObj, function(error, result){
if(!error){
var product = Session.get('editingProduct');
product.imagePath = Images.link(fileObj);
Session.set('editingProduct', product);
}else{
console.log(error);
}
});
$('#editModal [name="imagePath"]').val(Images.link(fileObj));
}else{
console.log(error);
}
//currentUploadProgress.set(false);
$(event.target).val('');
$(event.target).removeClass('loading');
},
onProgress: _.throttle(function(progress){
//currentUploadProgress.set(progress);
}, 500),
onBeforeUpload: function(){
var allowedExt, allowedMaxSize;
allowedExt = ['', 'jpeg', 'jpg', 'png'];
allowedMaxSize = 5242880;
if($.inArray(this.ext, allowedExt) && this.size < allowedMaxSize){
return true;
}else{
return "Max upload size is " + (Math.round((allowedMaxSize / (1024 * 1024)) * 100) / 100) + " Mb. Allowed extensions is " + (allowedExt.join(', '));
}
},
streams: 8
});
});
from meteor-files.
@wanchopeblanco thank you for using it
Any ways, I don't see error on server, it is not appears?
from meteor-files.
No, im getting nothing on server just what i posted before
from meteor-files.
Weird, at least you supposed to see this message on server. Could you please double-check and run your code with following command (to make sure error is not caused by some junk files):
meteor reset && meteor update && meteor run --production
from meteor-files.
I thought the problem could be within the image version file path and changed to the same folder as the parent but it wont fix the issue.
from meteor-files.
I did that and now i get this error on server
I20151204-15:03:43.715(-5)? Meteor.Files Debugger: [findOne(XREWp8e4Z8hHehTrX)]
I20151204-15:03:43.716(-5)? Meteor.Files Debugger: [download([object Object], original)]
W20151204-15:03:43.716(-5)? (STDERR) Meteor.Files Debugger: [download([object Object], original)] [404] File not found: undefined
I20151204-15:03:46.082(-5)? Meteor.Files Debugger: [findOne(XREWp8e4Z8hHehTrX)]
I20151204-15:03:46.083(-5)? Meteor.Files Debugger: [download([object Object], original)]
W20151204-15:03:46.083(-5)? (STDERR) Meteor.Files Debugger: [download([object Object], original)] [404] File not found: undefined
I20151204-15:03:49.984(-5)? Meteor.Files Debugger: [MeteorFileUnlink]
I20151204-15:03:49.985(-5)? Meteor.Files Debugger: [remove([object Object])]
from meteor-files.
I guess file just not found here:
Images.remove({'meta.postId': postId, 'meta.type': 'image', 'meta.document':'product'});
- Check if files are written to FS, (physically find them in finder/or how it's called in MS?)
- This line looks good
Meteor.Files Debugger: [remove([object Object])]
, are you sure there is no more errors after it?
from meteor-files.
The problem was on my side, when creating the versions the file path was null so it wont find it when deleting.
Thanks for the support with the issue.
from meteor-files.
@wanchopeblanco thank you.
btw if you found this driver useful do not hesitate to star it at both github and atmosphere. Also you may like to Tweet about it or share at Facebook
from meteor-files.
Related Issues (20)
- [FilesCollection.ServiceFile] Path "/assets/app/uploads/ServiceFileCollection" is not writable! HOT 2
- How to change item metadata before it is inserted into the collection? HOT 9
- How do I update a filesCollection after Server side Write created? HOT 1
- Get user ip on upload HOT 9
- Since Meteor 2.11 - Exception in setTimeout callback: TypeError: fs.remove is not a function HOT 9
- Question: Can you store directly in GridFS? HOT 2
- Question: Save link in database?
- Update aws-sdk to v3 in 'Use AWS:S3 As Storage' Documentation HOT 4
- Files.load -> options.fileName is not in filepath HOT 2
- FilesCollection.find(...).each() not working properly? HOT 1
- HTTP uploads not working, multi-instance/cluster environment NGINX balanced HOT 5
- onAfterUpload not throwing error in uploader.on('end') HOT 5
- Cannot stream a video with filenames longer than 80 characters HOT 1
- wrong custom error message when using HTTP
- Make Meteor-Files compatible with meteor-desktop? HOT 4
- Uncaught error when uploading an empty file
- Help Wanted: Method '_FilesCollectionAbort_attachments' not found [404] HOT 1
- Match error: Unknown key in field HOT 5
- User can not be determined in protected callback in Firefox HOT 5
- [3.0.0-beta.6] fileObj._id on upload end ? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-files.