Giter VIP home page Giter VIP logo

Comments (11)

indesignlatam avatar indesignlatam commented on July 17, 2024 2

By the way, Thanks for the quick reply and this fabulous library

from meteor-files.

dr-dimitru avatar dr-dimitru commented on July 17, 2024

@wanchopeblanco full stack trace please with debug turned on

from meteor-files.

indesignlatam avatar indesignlatam commented on July 17, 2024

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.

dr-dimitru avatar dr-dimitru commented on July 17, 2024

@wanchopeblanco thank you for using it
Any ways, I don't see error on server, it is not appears?

from meteor-files.

indesignlatam avatar indesignlatam commented on July 17, 2024

No, im getting nothing on server just what i posted before

from meteor-files.

dr-dimitru avatar dr-dimitru commented on July 17, 2024

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.

indesignlatam avatar indesignlatam commented on July 17, 2024

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.

indesignlatam avatar indesignlatam commented on July 17, 2024

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.

dr-dimitru avatar dr-dimitru commented on July 17, 2024

I guess file just not found here:

Images.remove({'meta.postId': postId, 'meta.type': 'image', 'meta.document':'product'});
  1. Check if files are written to FS, (physically find them in finder/or how it's called in MS?)
  2. This line looks good Meteor.Files Debugger: [remove([object Object])], are you sure there is no more errors after it?

from meteor-files.

indesignlatam avatar indesignlatam commented on July 17, 2024

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.

dr-dimitru avatar dr-dimitru commented on July 17, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.