Find Jobs
Hire Freelancers

HTML5 XHR Image Uploader - Chrome Extension

$10-30 USD

V teku
Objavljeno pred več kot 9 leti

$10-30 USD

Plačilo ob dostavi
Hi, I currently have a Chrome Extension which you can download here. [login to view URL] The extension allows the user to take screen captures of any website and then upload them to my website. However, due to updating my script, instead of using a flash based uploader - it now uses HTML5. Any attempt to upload an image via the extension would result in uploading a small brown box. I asked the developer of the script why, and this is what he said..... My Message: -------------------- I have modified my Google Chrome extension to work with V3 as this uses POST, however when I upload the file, I'm still getting the small brown box?? Can you spot anything wrong with this piece of code?? [Code] function uploadImage(website, callback) { try { if (website == "ultraimg") { ajaxObj = $.ajax({ url: "[login to view URL]", type: "POST", timeout: 45000, data:{key:"3374fa58c672fcaad8dab979f7687397", source: encodeURIComponent([login to view URL]().replace(/^data:image\/(png|jpg);base64,/, ""))}, dataType: "json", success: function(data) { if(data.status_code == 200) { var imageURL = data.image.display_url; var htmlURL = '<img src="' + data.image.display_url + '" border="0" />'; var BBCodeURL = "[IMG]" + data.image.display_url + "[/IMG]"; callback({imageURL:imageURL, htmlURL:htmlURL, BBCodeURL:BBCodeURL}); [login to view URL](imageURL); return; } else { callback({error:"Error: " + data.status_code + " - " + data.status_txt}); } } }); } } catch (e) { callback({error:"Error: " + e + ". Please try later or try another upload site!"}); } } [/code] A similar code used to work with Version 2 of Chevereto, but since V3, I've always received the brown box? :S However other programs such as ShareX works perfectly fine :S The API response code for the direct link was [login to view URL] As far as I can tell, I'm not using the GET method here? So why the brown box still ? His Response: ---------------------- It won't work because you are sending the data using $.ajax and converting the base64 string. PHP base64 string is very sensitive and if the string has the slightest issue it won't work. If you notice in Chevereto uploader I use the direct HTML 5 XHR to upload the files because every time I used the base64 implementation from javascript it didn't work. So I ended up emulating a html file form. ////// I presume his last sentence was referring to the actual website script. So anyway, as you can see, at the moment MY code doesn't work... However, it might work if it's converted to use HTML5 XHR ?? I'm not entirely sure if that's possible or if I'm asking the correct question. Feel free to download my extension that I linked to above and try to edit the file called... '[login to view URL]' - within the 'js' folder. If you are able to get the screen captured images uploaded and working 100%, and are also able to get the correct API responses then I will be very happy to work with you. Thank you for reading my project.
ID projekta: 6358816

Več o projektu

1 ponudba
Projekt na daljavo
Aktivno pred 10 leti

Želite zaslužiti?

Prednosti oddajanja ponudb na Freelancerju

Nastavite svoj proračun in časovni okvir
Prejmite plačilo za svoje delo
Povzetek predloga
Registracija in oddajanje ponudb sta brezplačna
1 freelancer je oddal ponudbo s povprečno vrednostjo $55 USD za to delo
Avatar uporabnika
Đề xuất vẫn chưa được gửi
$55 USD v 3 dneh
0,0 (0 ocen)
0,0
0,0

O stranki

Zastava UNITED KINGDOM
IPSWICH, United Kingdom
5,0
13
Član(ica) od jul. 6, 2002

Verifikacija stranke

Hvala! Po e-pošti smo vam poslali povezavo za prevzem brezplačnega dobropisa.
Pri pošiljanju vašega e-sporočila je šlo nekaj narobe. Poskusite znova.
Registrirani uporabniki Skupaj objavljenih del
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Nalaganje predogleda
Geolociranje je bilo dovoljeno.
Vaša prijavna seja je potekla, zato ste bili odjavljeni. Prosimo, da se znova prijavite.