Lepozepo / cloudinary

MIT License
94 stars 42 forks source link

Problem with uploading to server #46

Closed arnoldgamboa closed 8 years ago

arnoldgamboa commented 8 years ago

I have 4.0.0 working locally (can't seem to upgrade to 4.0.1, I'm not sure why). But when I'm uploading to live server (through mup), it breaks it. Attached is the screenshot. Any idea why?

Thanks!

speakactive

arnoldgamboa commented 8 years ago

If it would help, here's where the error is coming from. Take note that everything seems to be working fine in my local build.

speakactive_and_slack

Lepozepo commented 8 years ago

Is your production server behind SSL?

Marcelo Reyna

On Fri, Sep 25, 2015 at 11:45 PM, Arnold Gamboa notifications@github.com wrote:

If it would help, here's where the error is coming from. Take note that everything seems to be working fine in my local build.

speakactive_and_slack

Reply to this email directly or view it on GitHub: https://github.com/Lepozepo/cloudinary/issues/46#issuecomment-143398794

arnoldgamboa commented 8 years ago

It's not. 

arnoldgamboa commented 8 years ago

... and previous version of your package (before 4.0) works on the server, too (if that helps).

Thanks!

-Arnold

Lepozepo commented 8 years ago

What does your code look like? The most current version of this package only supports client side uploads and I think the commands are a bit different.

Marcelo Reyna

On Sat, Sep 26, 2015 at 7:15 PM, Arnold Gamboa notifications@github.com wrote:

... and previous version of your package (before 4.0) works on the server, too (if that helps). Thanks!

-Arnold

Reply to this email directly or view it on GitHub: https://github.com/Lepozepo/cloudinary/issues/46#issuecomment-143506586

arnoldgamboa commented 8 years ago

Solved it.

It's how c.url is treated. Here's what helped: http://www.heapoverflow.me/question-display-a-profile-photo-with-meteor-32187497

(I wonder though why it worked locally and not on the server)

Lepozepo commented 8 years ago

Hmm, that looks like the helper wasn't being used right. c.url expects a public ID not a url. Still, it is surprising that it was working. It sounds like it might be an issue with cloudinary's javascript plugin. @TalLevAmi what do you think?

TalLevAmi commented 8 years ago

@Lepozepo Not sure I fully understand the issue, but cloudinary_url is not meant to be called with null/undefined. If that's an issue with the Meteor integration, we can add a shortcut that returns null/undefined in this case. Will that help?

Lepozepo commented 8 years ago

@TalLevAmi I guess it would be good for both cloudinaryJS and my helper to return something instead of breaking the rest of the code when public_id is falsy. I'm trying to understand why it would fail for @arnoldgamboa in production but not locally. Maybe something inside his loop is returning false and messing things up in production. Could you check @arnoldgamboa ?

TalLevAmi commented 8 years ago

See https://github.com/cloudinary/cloudinary_js/commit/aacb2a504b789d92176ac4ad64ec7c5f3f06b993

Lepozepo commented 8 years ago

Sweet! Thanks @TalLevAmi

Lepozepo commented 8 years ago

Fixed with cf44f2262af6e4532989331780a3ee98a2173a09 I think, @arnoldgamboa please test further to see if it's anything else ^_^.

arnoldgamboa commented 8 years ago

Thank you guys for the help. 

Sent from iPhone

On Mon, Sep 28, 2015 at 11:10 PM -0700, "Marcelo Reyna" notifications@github.com wrote:

Fixed with cf44f22 I think, @arnoldgamboa please test further to see if it's anything else ^_^.

— Reply to this email directly or view it on GitHub.