Find Jobs
Hire Freelancers

HTML5 XHR Image Uploader - Chrome Extension -- 2

$10-30 USD

Terminado
Publicado hace más de 9 años

$10-30 USD

Pagado a la entrega
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 del proyecto: 6369847

Información sobre el proyecto

1 propuesta
Proyecto remoto
Activo hace 10 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
Nie złożono jeszcze oferty.
$30 USD en 0 día
4,5 (33 comentarios)
5,1
5,1

Sobre este cliente

Bandera de UNITED KINGDOM
United Kingdom
5,0
3
Miembro desde jul 6, 2002

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.