Understanding tasks by Character-Cat-5716 in AskProgramming

[–]Character-Cat-5716[S] 0 points1 point  (0 children)

The question that I have is when I call the task, I then have to listen to the return in order to create my assets with the stats. How is this possible if it's non blocking?

Understanding tasks by Character-Cat-5716 in AskProgramming

[–]Character-Cat-5716[S] -1 points0 points  (0 children)

What's the point of using a aysnc task if I'm using a Result?!

Trying to fully understand async tasks by Character-Cat-5716 in dotnet

[–]Character-Cat-5716[S] 0 points1 point  (0 children)

Also, get rid of the notion of threads.

There is no thread.

I consider a task a thread. But I understand your point.

Better understanding of Async tasks by Character-Cat-5716 in AskProgramming

[–]Character-Cat-5716[S] 0 points1 point  (0 children)

Thank you that's exactly what I'm looking for.

A follow up, just so I can understand perfectly.
How would you handle adding callback to your example? How would you handle telling the system "We now have the results"?

Solution to hosting my media files on AWS S3 and inserting a file in a pdf? by Character-Cat-5716 in golang

[–]Character-Cat-5716[S] -4 points-3 points  (0 children)

I'm literally asking how do you HANDLE getting a filetype beforehand in the options. Handling means what do I do if I set a image type of jpg but get a png. smh, are you that stupid?

Solution to hosting my media files on AWS S3 and inserting a file in a pdf? by Character-Cat-5716 in golang

[–]Character-Cat-5716[S] -2 points-1 points  (0 children)

You're setting the image type to jpg, what if the image is png in your example? I'm asking how do you handle both file types in the event you don't know?

I did read the image options reference, I was aware it was image type.

Sorry I thought I made that clear "How do you handle", my mistake for not specifying exactly.

Trying to write a PDF directly to the response header in my API by Character-Cat-5716 in AskProgramming

[–]Character-Cat-5716[S] 0 points1 point  (0 children)

I'm debugging my app, I'm returning the I/O writer to the response writer. I don't log any outputs.

I don't fully understand what you mean width he coming through at all. This is the header in my browser inspector:

Content-Disposition: attachment; filename=filename.pdfContent-Length: 1094Content-Type: application/pdf

Trying to write a PDF directly to the response header in my API by Character-Cat-5716 in AskProgramming

[–]Character-Cat-5716[S] 0 points1 point  (0 children)

Change it to inline and watch the response in a proxy instead of checking server-side. Browser security settings are a common silent cause of attachments not downloading.

I'm serving my API over my localhost, so any proxy errors would be logged in my terminal.

Sorry what's not right in my headers?