yogiben / meteor-starter

Kickstart your meteor projects
MIT License
423 stars 145 forks source link

Picture upload not working #97

Closed fdddk23 closed 8 years ago

fdddk23 commented 8 years ago

Hi,

When I upload a picture via yogiben:autform-file it (seems to be) uploaded to my cfs collection but afterwards it is shown as an broken link and following error message appears in the console:

http-call-client.js:101 The provided value 'undefined' is not a valid enum value of type XMLHttpRequestResponseType.

The broken link has following html: img alt="" class="img-fileUpload-thumbnail img-thumbnail img-rounded" src="/cfs/files/Attachments/9q38FobbxRknLxo7p/pic05.jpg?token=eyJhdXRoVG9rZW4iOiJ0RGdYbHdkcnREdmJEOHdVTG1sUkY2Z1dybDlzZmkzM2FRMThnU1JaSkM1In0%3D"

mondrus commented 8 years ago

Are you running Windows or Unix?

Thanks

From: fdddk23 [mailto:notifications@github.com] Sent: Tuesday, December 15, 2015 3:28 PM To: yogiben/meteor-starter meteor-starter@noreply.github.com Subject: [meteor-starter] Picture upload not working (#97)

Hi,

When I upload a picture via yogiben:autform-file it (seems to be) uploaded to my cfs collection but afterwards it is shown as an broken link and following error message appears in the console:

http-call-clientjs:101 The provided value 'undefined' is not a valid enum value of type XMLHttpRequestResponseType

The broken link has following html:

— Reply to this email directly or view it on GitHub https://github.com/yogiben/meteor-starter/issues/97 . https://github.com/notifications/beacon/AGFMn658vGR5oBAVGguc0Wj7HZwNeb4dks5pQG9AgaJpZM4G1-eo.gif

fdddk23 commented 8 years ago

Windows

mondrus commented 8 years ago

See previous commits. You MUST HAVE gm.exe working from the command line. It’s a windows utility to manipulate images. Graphics Magic is the package. http://www.graphicsmagick.org/

Thanks

David Mondrus

From: fdddk23 [mailto:notifications@github.com] Sent: Wednesday, December 16, 2015 2:10 AM To: yogiben/meteor-starter meteor-starter@noreply.github.com Cc: David Mondrus david@mondrus.com Subject: Re: [meteor-starter] Picture upload not working (#97)

Windows

— Reply to this email directly or view it on GitHub https://github.com/yogiben/meteor-starter/issues/97#issuecomment-165018842 . https://github.com/notifications/beacon/AGFMnxbxU5E3mb5rqehi3OEQ1LWzksIcks5pQQW6gaJpZM4G1-eo.gif

fdddk23 commented 8 years ago

Thank you for your help! I didn't knew that. I installed now gm and it is also available from command line. Nevertheless the same problem :/ What else can I try?

fdddk23 commented 8 years ago

Nobody else experiencing a problem with this plugin?

snamoah commented 8 years ago

@fdddk23 do you have the still autopublish package in your app?

fdddk23 commented 8 years ago

No, I havent' autopublish in my app

snamoah commented 8 years ago

@fdddk23 you would have to then publish and subscribe to the picture collection in the template your rendering the image in

fdddk23 commented 8 years ago

i.e. at Profile this is done:

this.route("profile", { path: "/profile", waitOn: function() { return Meteor.subscribe('profilePictures'); } });

Meteor.publish('profilePictures', function() { return ProfilePictures.find(); });

So this should be ok?!

fdddk23 commented 8 years ago

Ohhh suddenly it is now working :) I didn't change anything... maybe due to a restart after installing GM ?! I will try now but thanks to all :)

snamoah commented 8 years ago

Cool!