Http request unside a pdf file - http-post

I send a pdf file to some customers. I want to know witch are opened my file. My dream will be to have a http request post inside the pdf to my server. But i search on some website without result.
Someone know if it's possible? And how i could do that?
Thanks a lot in advance

Instead of sending the PDF file, you might want to send a link (unique to each recipient) where the PDF can be downloaded. This link can log which of the recipients has downloaded the PDF.
This will be easier to set up and your results will be more trustworthy.

Related

How to convert jmeter dashboard report to pdf

How to convert jmeter dashboard report to pdf
I'm unable to convert html report to pdf. plz suggest me the solution
C'mon, have you done at least basic research before asking? There are a lot of options, for example:
Print it to file, all modern browsers allow saving web content as PDF, check out How to save a webpage as a PDF
There are online solutions like https://html2pdf.com/
There are offline solutions like http://www.pdflite.com/html-to-pdf/
There is BM.Sense online results analysis service which allows saving load test report as PDF
I tried many ways none of it works for Jmeter HTML report, other way was to zip all the artifacts and send over email but, that zip files contains .js files which get blocked by Gmail Yahoo
I written small code in Selenium to take screenshot (used Ashot API) of HTML report and sending over mail as attachment. Challenge here is headless mode of browser takes improper screenshot, so if you are on windows this can be achieved but as PNG, till now nothing works for PDF.

Get CRM WRPC-Token for display images in Webressource

In my CRM HTML-Webresource, I got to display E-Mail activities with it's images (saved as attachments) as HTML. I take the description attribute for that.
As I realized, at least in CRM-Online, every attachment-image has a WRPC-Token that I need for the correct file path to load it.
How can I get the token? Most of the solutions that I found are either old or don't work for my circumstances.
Can I fetch the token out of the given HTML?
This approach doesn't make sense to me,
Attachments are stored within a database behind a web service, they are not at a file path you can simply open.
WRPC-Token's are used in security, I'm not sure how it is relevant or could provide a file path.
I would suggest writing code to access the CRM web services, this will enable you to retrieve the attachment data. There is an example here Sample: Create, retrieve, update, and delete an email attachment.

Javascript Upload and real image refresh/reload

I need to create, for a specific project, an image manager that works via Ajax (to get the list of images, display them, ...).
The upload of new images, or image modification, is done via an Ajax script (using the new javascript File API).
The upload works fine, but I encounter a problem in case of image modification : the image displayed by the browser after upload is the cached one and not the uploaded one !!
I know it's a classic cache problem, that can be solved via the 'imagesrc?new Date.getTime()' hack, but I can't use it here.
in fact, this hack doesn't really reload the image, it only create a new instance of the image into the cache, associated to the image url 'imagesrc?new Date.getTime()'.
So, if at any moment, into the image manager, I retry to display the image, without adding the '?new Date.getTime()' to the src, it will display again the old image.
And I either cannot add this hack systematically (because, for example, if the image manager needs to display a lot of very heavy images, it's usefull to get them from the browser cache until they are modified).
I searched a way to solve this problem on internet (really replace the cached image after a javascript upload instead of using the above hack), but I found nothing.
Is there a way to do this, or is it totally impossible ?
Any help or suggestion would be greatly appreciated.
Many thanks in advance
Olivier
Configure your server to send ETag-headers for the images.
An ETag is a hash-value of the file that changes when the file is modified. If an ETag is sent, the browser will add an If-None-Match-header containing the last received ETag of that ressource on its next request and the server will respond with 304: not modified to save traffic if nothing has changed or send the new file if there is one.

Don't execute flag in http response?

I was reading about attacks on sites with the ability to upload and download files. Some attacks were about uploading a jpg which is really a html file and a comment about what if you want users to be allowed to store html and download them (or perhaps view them in the browser w/o using the save as feature).
Is there some type of flag i can use to say do not execute? I will want users to view images or video files other have uploaded. What if i'd like user html to be displayed but i dont want to force users to download them (content-disposition attachment).
Is there a way i can say hey here is some user data. It could be an image so i should allow img src to work. It could be an html so i'd like users to see it but dont allow it to read/write cookies/localstorage/call ajax request/etc?
-edit- Come to think of it. All of my user data is hosted on its own cookieless subdomain for static files. That would get rid of many problems i mention but what else is left to deal with? Also i believe my mime response completely depends on what my web server does (nginx atm) which could simply be look at the file extension.
-edit2- I adjusted my nginx config to add the application/unknown Content-Type. It seems to do exactly what i want. I saw a suggestion to use octet-stream for unknown files but that causes browsers (at least firefox) to try to download it even if its a jpg capable being viewed in browser.
It all depends on the Content-Type in your HTTP Response.
Browsers handle the data returned by the Content-Type in HTTP response.
For example if let say a user uploads a HTML file in a upload field supposedly for photo upload, as long as your web server gives Content-Type as image/jpeg (or image/png et al) the browser should handle it as an image - and in this case an invalid image because the image contains weird HTML stuff inside instead of the usual binary.
In any case, if you are feeling unsecure, you can always peek into the file data during upload validation.

add local rss feed into live bookmark

i have a website which i want to monitor, and i have create a script that convert information i need in that website into a rss feed file. i want firefox to add this file as live bookmark. when type the location of the rss feed file, firefox does not display as usual rss feed. how to make firefox display it as i want ? sorry for my bad english.
update: after googling, i wonder if it's due to content-type header ? but i don't know how to set content-type of local file in firefox-addons :-(

Resources