Questions tagged [bulletproof]

A single-class php library to upload images

Bulletproof is a single-class library to securely upload images in PHP.

9 questions
13
votes
1 answer

Resizing images before upload when using BulletProof upload class

found this which is nice and quick to implement. It works great but what I want it before the images are uploaded, that they get resized to a max width but keeping the ratio. Let say i am uploading an image with a width of 5000px, i want this to be…
Lovelock
  • 7,689
  • 19
  • 86
  • 186
2
votes
1 answer

PHP - Upload Multiple Files with Bulletproof Library

I'm currently trying to upload multiple image files using a single form (AJAX) and the Bulletproof library. I managed to get 1 working, the #avatar-upload-input successfully uploads images through the AJAX form.
Appel Flap
  • 261
  • 3
  • 23
2
votes
0 answers

BulletProof's image class not uploading at all

So in BulletProof's documentation, I follow what I had to do and the image doesn't even get to "echo" phase #2. https://github.com/samayo/bulletproof/blob/master/README.md if (isset($_POST['post_blog_submit'])) { $image = new…
Cameron Swyft
  • 448
  • 2
  • 6
  • 21
2
votes
1 answer

move_uploaded_file - prevent rotation / ignore exif data

working on a upload image feature for my custom CMS. I have completed the feature, but have an image when uploading images from mobile devices. Only tested on IOS so far but the issue is: If the user selects to take a picture and does so in…
Lovelock
  • 7,689
  • 19
  • 86
  • 186
2
votes
2 answers

Writing test cases in unit-testing for file/image uploads

I am trying to write a tests for my image upload library Bulletproof. The problem is that, even though I know the basics of Unit Testing. I have a problem writing one for file uploads. As far as my experience goes, I have only wrote very simple…
samayo
  • 16,163
  • 12
  • 91
  • 106
1
vote
0 answers

Can bulletproof php upload pdf and word files?

I have used bulletproof php in the past for secure picture file uploads and trying recently for pdf and word files, it responded with an error message : 'Invalid File! Only (pdf, docx) image types are allowed', making me understand it will probably…
nkcho
  • 21
  • 5
0
votes
0 answers

How to upload blob with Bulletproof php

I generate a blob jpeg in client side and need to send it to server using ajax and bulletproof php, is it possible without using database ? Can i convert blob to a file client side so bulletproof can send it to server ?
stackov
  • 71
  • 12
0
votes
1 answer

Modifying PHP Bulletproof to handle non image uploads

I use Bulletproof to handle image uploads in PHP and it is awesome. I am now working with a multipart form which will send images as well as other file types (specifically .pdf, .doc and .docx). I saw this question where the author of Bulletproof…
Mimzo
  • 69
  • 1
  • 9
0
votes
0 answers

Uploading image to my php server from Android

I want to select image from my gallery, and then upload it to my php server. Then the php have to save my image in a directory in my server. But i have a error at loading image to my server and I don't know why. This is my code from Android: import…