Find Jobs
Hire Freelancers

HTML5 XHR Image Uploader - Chrome Extension -- 2

$10-30 USD

完了済み
投稿日: 9年以上前

$10-30 USD

完了時にお支払い
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: 6369847

プロジェクトについて

1個の提案
リモートプロジェクト
アクティブ 10年前

お金を稼ぎたいですか?

Freelancerで入札する利点

予算と期間を設定してください
仕事で報酬を得る
提案をご説明ください
登録して仕事に入札するのは無料です
アワード者:
ユーザーアバター
Nie złożono jeszcze oferty.
$30 USD 0日以内
4.5 (33 レビュー)
5.1
5.1

クライアントについて

UNITED KINGDOMのフラグ
United Kingdom
5.0
3
メンバー登録日:7月 6, 2002

クライアント確認

ありがとうございます!無料クレジットを受け取るリンクをメールしました。
メールを送信中に問題が発生しました。もう一度お試しください。
登録ユーザー 投稿された仕事の合計
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
プレビューを読み込み中
位置情報へのアクセスが許可されました。
あなたのログインセッションの有効期限がきれ、ログアウトされました。もう一度ログインしてください。