Find Jobs
Hire Freelancers

Send blob from javascript to PHP and save it as a file on server

€30-250 EUR

Completed
Posted over 3 years ago

€30-250 EUR

Paid on delivery
We are looking for a PHP / JAVASCRIPT / AJAX / JQUERY developer with experience in files use. It's a simple job. We provide two downloadable scripts, without execution environment, to modify the code and we perform the tests. We have two files: 1) [login to view URL] This file contains an HTML / PHP form with text inputs and a file type input. We used it to upload a file by sending the data via $_POST to the second file. 2) [login to view URL] This file is a PHP script that obtains the $_POST and $_FILES data and saves the image to the server and the inputs to the database. We are integrating a javascript image editor, so the user can now edit the image before uploading it. It works correctly but this script returns a blob, not a file in an input as we had before. We can visualize the blob in the body, we have its url: // Create preview image and append to body element var image = new Image(); [login to view URL] = [login to view URL]([login to view URL]); We want, instead of previewing this blob, to send it together with the text inputs to the [login to view URL] file to continue the same data collection process. We are looking for someone able to *save the content of this blob in a hidden input file*, together with the rest of the values of the form, or to *send all the values of the form from javascript* and collect them in PHP in the second file [login to view URL], or able to *save the file in a temp folder in the server and save this url to the form so we can read the file from PHP*. Currently we obtain the file with $_FILES: if (isset($_FILES['uploadedFile']) && $_FILES['uploadedFile']['error'] === UPLOAD_ERR_OK && $_FILES['uploadedFile']['size'] > 1) { // get details of the uploaded file $fileTmpPath = $_FILES['uploadedFile']['tmp_name']; $fileName = $_FILES['uploadedFile']['name']; $fileSize = $_FILES['uploadedFile']['size']; $fileType = $_FILES['uploadedFile']['type']; $fileNameCmps = explode(".", $fileName); $fileExtension = strtolower(end($fileNameCmps)); // sanitize file-name $newFileName = md5(time() . $fileName) . '.' . $fileExtension; // check if file has one of the following extensions $allowedfileExtensions = array('jpg', 'png', 'jpeg'); (...) ImageJPEG($dst_img,'./i/laspichas/' . $user_nicename .'/' . date("m") . date("Y") . '/'. $newFileName,65); The image name is not important, must be random. The type will be image (jpg jpeg gif png). The size should be calculated. We are using DOKA to generate the blob. -> [login to view URL]
Project ID: 28715479

About the project

7 proposals
Remote project
Active 3 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Greetings It’s Serhan, a passionate fullstack web developer. I will make your needs (save the content of this blob in a hidden input file) to be done in a no time. Feel free to share details with me. Have a nice day. Kind regards.
€80 EUR in 1 day
5.0 (16 reviews)
4.5
4.5
7 freelancers are bidding on average €122 EUR for this job
User Avatar
Hi, I am a PHP website developer. I can write a script to upload your blob data to your server file.
€30 EUR in 1 day
4.8 (263 reviews)
6.8
6.8
User Avatar
Hi, there I am a professional PHP developer who has over 10 years of experience. I read your job description carefully and I am very interested in your job. Regarding after your job post, I am sure of the success of your project. I promise I will keep the deadline, fix bugs and deliver a qualified code so that you will be satisfied with my work. I can start working right now and can fully complete your job 100%. Looking forward to your chatting and really hope to work with you. Thanks.
€200 EUR in 2 days
5.0 (8 reviews)
4.6
4.6
User Avatar
Hi There, I have a visual of your project description & grasp all your requirements. But few questions are grappling up in my mind. I need to clarify these queries via chat. Please come over the chat to discuss methodological aspects. And provide all the documental details in chat. Please check my certifications to estimate my skills. Regards,
€140 EUR in 7 days
5.0 (11 reviews)
4.3
4.3
User Avatar
I am sure you will get delivered good result with perfection in just one day. Please keep in touch for business in the future.
€100 EUR in 1 day
5.0 (7 reviews)
4.3
4.3
User Avatar
Hi jesscobarroyepe. I've read your description crefully and grasped your requirements. I've 5+ years of experince in PHP, JavaScript, and Ajax. So, I can finish your project perfetly. Let's disucss more detials by chatting. Thanks.
€80 EUR in 2 days
5.0 (1 review)
2.4
2.4
User Avatar
Hi greetings it's Narendra Kumar full stack developer, I go through your requirements and ok am capable to fulfill the requirements, because I have the skills and experience as well.
€222 EUR in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of SPAIN
CEUTI, Spain
5.0
2
Payment method verified
Member since Aug 20, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.