Generating a PDF with an image continuously falls with a request timeout - tcpdf

Generating a PDF using TCPDF in PrestaShop 1.6 with an image ends with a request timeout while requesting the same image inside the server.
The PDF is generating fine for the ones without the image.
We are generating E-ticket as PDF for the customers who purchased our ticket and we send them as email attachment. Also, we have given them the possibility to generate the E-ticket PDF when they click on the button on their order history. But that too is not getting generated.

Related

Download a file that after recaptcha fails and redirect to home page

I have tried everything I could think of to download any document from this page: https://www.acingov.pt/acingovprod/2/index.php/zonaPublica/zona_publica_c/indexAdjudicacoes/165
The download button launches a new window (while sending a POST request), the URL changes, but after a while this new page redirects to the homepage. I can see, using a HTTP sniffer, some ids and recaptcha response being sent to the new window, but nothing really happens and no ZIP file is downloaded. Tried different browsers and OSes. Any ideas/solutions? Thanks

Video as attachment in email

I use graph api to send emails to users. Is it possible to add video as attachment to email ? I converted .mp4 to binary string, set contentType to video/mp4, id to new Guid.
I created a request to send email, got correct response, but I don't recieve email (emails without videos works fine).
Documentation is not really helpful.
If the file size is between 3MB and 150MB, create an upload session, and iteratively use PUT to upload ranges of bytes of the file until you have uploaded the entire file. A header in the final successful PUT response includes a URL with the attachment ID.
There is a one limitation. An app with delegated permissions returns HTTP 403 Forbidden when attempting to attach large files to an Outlook message that is in a shared or delegated mailbox. With delegated permissions, createUploadSession succeeds only if the message is in the signed-in user's mailbox.
Resources:
Atttach large file

Slack Upload Email using API

I´m trying to upload an email (I have the html code) to slack.
I know that there is a possiblity to upload files using a slack email adress, but in my case I cannot use it.
I used the slack api method files.upload for this, but the files only appear as code lines and not as html content.
Yes, you can upload emails to Slack, but only as plain text files using files.upload. That however works pretty well.
To upload a plain text file with files.upload sent the file contents as string in content (this must be sent via a POST) and set filetype to text.

How to track an gmail's email through an api attach to an src tag of image?

I want to track the email when somebody opens the image attach to that email. So i have been rendering an image byte through an api attach to the image tag rendered in email template. But whwn i am opening the email the src tag embeds the google proxy server address to my api address and not sending to my backend. background-image:url('https://ci6.googleusercontent.com/proxy/RMM_t4IFMpVLwbzLttQJroXN8EPE8atXTqU703UgLhhhytAO-_AvbFUjVyDXKGgcExvdyZtB7aBMSNHphT8n7rVxNMvsij1BsL4SCw=s0-d-e1-ft#https://resources.sparkwork.io/renderImage'). In this my actual api is https://resources.sparkwork.io/renderImage .So how can i solve this problem. Because when i am attaching some image url them its working and showing that image but when i am using my backend api then call is not coming to my backend to render that byte code of image. So any solution to solve this problem ?

Opening .pdf files in browser from Amazon S3 with AWS Key and Signature attributes?

When I try clicking a pdf link on my website in Chrome and FF it does not do anything. I can right-click and save as but I cannot open it up within the browser. Both browsers have adobe reader enabled and works when I remove the AWS Key and signature.
https://s3.amazonaws.com/bucket/sample.pdf?AWSAccessKeyId=&Expires=&Signature= // Does not open
https://s3.amazonaws.com/bucket/mypdf.pdf // Opens fine
It works fine in both IE and Opera. Any way to bypass this?
The reason of your problem is really obvious, but could be difficult to resolve. When you open nonKey link
https://s3.amazonaws.com/bucket/mypdf.pdf
browser gets .pdf extension at the end of the link and tries to download it. But when you have additional request params your link is not ends with .pdf and that may cause the problem.
It looks like your uploaded pdf file got no metadata for content-type. If you don't have Figure out content types automatically checkbox checked during upload, try to set content-type manually by adding metadata
content-type: application/pdf
Other idea is to make browser think that the link is ending with .pdf, so try to download with this link:
https://s3.amazonaws.com/bucket/sample.pdf?AWSAccessKeyId=a&Expires=b&Signature=c&file=sample.pdf

Resources