Code Monkey home page Code Monkey logo

Comments (14)

Jandev avatar Jandev commented on June 6, 2024 1

Yeah, I'll get on it asap.
Last week was a bit hectic due to being sick, but all better now :-)

from cfpexchange.

Jandev avatar Jandev commented on June 6, 2024 1

I'd put the scaling and sizing in a different PR, just to keep stuff clean.

Otherwise I'll have to rename my feature toggle also ;-)

from cfpexchange.

jfversluis avatar jfversluis commented on June 6, 2024

Yeah I noticed too. Together with images being shown weird to fit them in our layout. So downloading and serve them ourselves might not be bad together with resizing it to whatever we need

from cfpexchange.

Jandev avatar Jandev commented on June 6, 2024

I'd propose doing it something like this.
First, let the user Submit their CFP. In this POST we can place a message on an Azure Servicebus Queue. This message should probably look something like this:

{
    "id": "guid",
    "eventImageUrl": "string"
}

An Azure Function will automatically be triggered by this message on the queue.
This Function will download the image from the eventImageUrl and store it in some (public) storage container (via an output binding to this storage container).

Of course, this Function will also have to update the EventImage in the repository. That's why we're sending the id in the message, so it can update this record in the repository.

Easy, eh...? :-)

Maybe it's a good idea to create a small ARM-template first before adding all of these dependencies.

from cfpexchange.

jfversluis avatar jfversluis commented on June 6, 2024

That sounds amazing!

from cfpexchange.

jfversluis avatar jfversluis commented on June 6, 2024

That being said, I'd love to take a look at this, but I could use some help with it. Maybe we can join forces?

from cfpexchange.

jfversluis avatar jfversluis commented on June 6, 2024

Great news! No worries, I didn't want to rush you! Was just wondering if you put the idea out there or also was going to do some work on it :)

from cfpexchange.

Jandev avatar Jandev commented on June 6, 2024

An update on the matter.

Just finished sending a message to the servicebus queue.
Now ready to create an Azure Function which will pick up the message, download the image, store it on one of our local storage accounts and update the record in the database with the new image url.
This second part should be easy :-)

from cfpexchange.

jfversluis avatar jfversluis commented on June 6, 2024

Awesome! I'm not really an image/design expert. But do we need to resize them all to the same size for consistency and good looks etc.? Or is that in there as well? Or maybe one step at a time... 😉

from cfpexchange.

jfversluis avatar jfversluis commented on June 6, 2024

So, App Insights in place, own image downloading should work, but doesn't. Any ideas? Any ideas on how to detect what is wrong?

Setting in production looks like this:

screenshot 2019-01-18 11 31 52

The code is just like on the master branch right now

from cfpexchange.

Jandev avatar Jandev commented on June 6, 2024

If Application Insights is set up correctly, you should be able to see something like this.
Application Insights Failures

The calls, failures, stacktrace, etc.
Might be useful for investigation.

Also, have you added the Application Insights setting to the Function App, or not yet?

from cfpexchange.

jfversluis avatar jfversluis commented on June 6, 2024

That I see! But nothing that seems related to the not downloading of images...

And I don't think Insights is setup for the Function yet. Let's see if I can get that to work.

from cfpexchange.

jfversluis avatar jfversluis commented on June 6, 2024

App Insights in Function is enabled and added #103 to deploy this automagically.

Tried it out with this CPF: https://cfp.exchange/cfp/details/euruko19-june-21st-22nd-2019-rotterdam
And it suddenly seems to work... Let's see if it stays that way.

from cfpexchange.

jfversluis avatar jfversluis commented on June 6, 2024

It seems downloading to our own blob storage works for now. Closing this one, if something comes up we'll open a new issue for that.

from cfpexchange.

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.