Not valid TIFF data! (no 0x4949 or 0x4D4D) - angularjs

I am using Filestack in an AngularJS app. when I upload an image I see this
Not valid TIFF data! (no 0x4949 or 0x4D4D)
In my console.log. I have done some searching but can not find a solution. Has anyone else had this issue and if so how did you fix it?

After talking with Filestack they are going to turn off that console.log from their APi

Related

Displaying both PNG and JPEG files in React

I think this is a repeat question but I can't seem to find the right answer...
I can upload png and jpeg images just fine (mern with multer) however when it comes to displaying the PNG file I have some issues.
File location is in the public/uploads folder
Successful display of JPEG (Displays JPEG correctly with the following) but fails on PNG
<img src={`${post.image}`} alt="testing"></img>
Error when it comes to PNG (404 Not Found)
GET http://localhost:3000/uploads/postImage-1637006445002-134875838-Screen%20Shot%202021-11-15%20at%205.25.09%20PM.png 404 (Not Found)
If I try the following, I get another kind of error for both JPEG and PNG
<img src={require(post.image).default} alt="testing"></img>
Cannot find module '/uploads/postImage-1637006445002-134875838-Screen Shot 2021-11-15 at 5.25.09 PM.png'
Doing an import such as below doesn't really make sense since I'm pulling the image name from a database and then referencing it's location in the public/uploads folder
import Image from 'uploads/fileName.png';
My other option is to a fileFilter on the backend and limit uploads to just JPEG but that seems limiting.
The only difference between the two that I can tell is the file type. Backend file handling is the exact same, so my question is how do I display PNG images the same exact way that I display JPEG's? Is there some config with React that I have to change?
Any help would be much appreciated. Thank you,
Your web server may be setup to receive the PNG mime type, but not to send files of this type, which would account for the 404 error you are receiving when you try to render it. Each web server is different in how this is configured.
I didn't know that spaces in the file name when uploading wouldn't get pulled properly by React. If you're running into this, what fixed my issue was removing spaces from the filename. Thanks to Steve -Cutter- Blades for pointing it out.

Error .. Failed to load PDF document (reactjs)

I am having issue while displaying pdf from data URI. I have tried this solution after looking a lot in google, do you guys think I have made any mistake ?
This is the link for codesandbox.
https://codesandbox.io/s/pdf-view-reactjs-4ygjc

Good reCAPTCHA downloading the audio gives a 404

While testing we discovered that the download audio is going to a Google URL but giving a 404.
Has anyone else experienced this and if so how did you fix it?
Here is a video of what I am referring to.
https://www.dropbox.com/s/lnf3enctrdpm3z4/404-google.mov?dl=0
Thank you for the help as I am stumped.
There's a typo in their url. You need to remove /audio.mp3.
For the demo recaptcha:
the provided url is https://www.google.com/recaptcha/api2/payload/audio.mp3?p=012345678ABC
the right one is https://www.google.com/recaptcha/api2/payload?p=012345678ABC

Creating PDF files with Html2ps/Html2pdf in CakePHP - Blank pdf being output

I've been following http://bakery.cakephp.org/articles/Casmo/2010/06/26/creating-pdf-files-with-html2ps-html2pdf and I am using CakePHP 1.3.
My "download" function outputs a blank .pdf. Some others in the above thread have experienced the same problem, however their solutions do not seem to help me.
Does anyone have any ideas?
Thank you
I was getting the same kind of issue. After checking the log, I found that the process function of this class renders a url and generate a PDF from that. If you supply it with a correct url then PDF can be generated. This url must be a valid url or it should not be under any browser authentication.

CKEditor image upload - getting the upload file

I was working on a very simple and fast image uploader for CKEditor. It works all like a charm, the only problem now is the actual upload. I thought it would all be easy, but now I am stuck.
I have the CK file-field and figured I could just run an ajax request to my php uploading script, the problem is now: how do i get the file data to upload it. The Ajax does not have the post values, so I am lost.
Please lead me into the right direction.
Thanks very much.
When you use Ajax to post the form, your file upload function should be able to get the values from the form as usual.
For example, see this article: http://www.finalwebsites.com/forums/topic/php-ajax-upload-example
Well, i now used an iFrame with the form in it. Using uplodify in the iframe it put the path to the file in a hidden input which I can extract from the frame and use as the src form my image in CKEditor.

Resources