How to upload image to twitpic in bada - social-networking

How to share images in twitpic. Social API in bada is not supporting twitpic. Is there another way for this? and what is meant by multipart form data?

By referring sample codes available in SDK we can upload image to server. The example code HTTPUpload with multipartFormdata helped to post the image to twitpic server.

You would need to write the protocol implementation yourself. I don't know it myself so I can't give you an exact answer but the bottom line is you should look at the sockets and web http namespaces, read the twitpic protocol for uploading and implement it... the hard way.
On the multipart side, look here http://en.wikipedia.org/wiki/MIME#Multipart_messages

Related

Store and use images locally

I'm quite new to addons development on Firefox.
I need to store an image from a given url, and then get the path to upload on another web. I read the Mozilla docs but can't figure how to do this.
I appreciate any help.
This does exactly what you need: How to download image to desktop with OS.File - you download the image with XHR, you then write that data to anywhere you want with OS.File.writeAtomic Instead of that XHR function, because you are using the SDK you should use the request module - https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/request

Django Rest Framework image upload and get image

I have a use case where an angular front end will need to submit image and Django Rest Framework API will need to save it to filesystem during image upload calls. During image download scenario the image will need also be served up from filesystem.
If someone already figured out this usecase please post it. Help will be highly appreciated.
Django REST framework provides an ImageField that can handle the uploading of images using Django's file upload handlers. So you might be interested in learning how it is done in Django first: Need a minimal Django file upload example

Google similar image search API

I'm trying to find out if there is a way to do google similar image searches via an API?
I know the image search api is depreciated but is it still useable?
https://developers.google.com/image-search/
Also... It seems that you can do image searches with the custom search api but I can't seem to work out if a similar image search is possible.
http://thenextweb.com/dd/2012/02/14/googles-custom-search-api-now-supports-image-only-results/
Any leads on advice on working this our would be appreciated.
Thanks!
If you have a URL for a hosted image (using Dropbox, imgur, etc), the answer at https://stackoverflow.com/a/15134958/116891 shows you how to find similar images. Basically,
http://images.google.com/searchbyimage?image_url=YOUR_HOSTED_URL
That is deprecated.
But I need JSON format of similar images result.
So, I try to use google cse but this is not supported searching of similar images.
It's just displayed image search results in a custom domain.
Another method that i try is URL.
http://images.google.com/searchbyimage?image_url=YOUR_HOSTED_URL
But this is not solution what i need.
It is because able to use in the browser. I need JSON.
Conclude, I decide to use Vision API of Google.
This is very simple.
https://cloud.google.com/vision/
You can try on the top.
First, access the URL.
Second, upload your image file on the "Try API".
Third, click "JSON" tab menu on the result.
You can be seen JSON about similar images.

Javascript file upload mechanism

I need for users to upload files (mostly images) without leaving the current webpage. What's the best tool, library or mechanism for doing this? I'm using the latest jQuery and Spring webmvc (with JSP), so if there's already a mechanism within them then that's ideal.
It would also be really great to have some kind of progress bar. Does that mean it requires coordination with the server to read the progress (where Spring would have to come into play)? Or is there a mechanism within JavaScript for this?
You should check out Plupload.
Plupload offers a cross-browser
JavaScript File uploading API that
handles multiple file uploads,
client-side progress meters, type
filtering and even client-side image
resizing and drag-and-drop from the
desktop. It achieves all of this by
providing backends for Flash,
Silverlight, Google Gears, HTML5 and
Browserplus and picking the most
capable available option.
Its really neat! Here's a link to some of their Demos...
http://www.plupload.com/example_jquery_ui.php
... and a screenshot of the jQuery UI queue widget (it has a progress bar!):
I hope this helps.
Hristo
I use uploadify pretty regularly: http://www.uploadify.com/
However it does use flash for the upload mechanism and as a result may create some issues if the user is authenticated.
You should use AJAX on the client side
http://www.webtoolkit.info/ajax-file-upload.html This tutorial covers all client side.
Om the server side
This tutorlal covers most of this issue:
http://www.ioncannon.net/programming/975/spring-3-file-upload-example/
Yopu can use jquery as well or any other JS framework.
But the mist important thing is the fact You need to remember that your tag on client side should have.
enctype='multipart/form-data'
property. it means that your request contains muultipart data.
Uploadify does that trick > http://www.uploadify.com/
All samples are php but you should be able to convert it to your platform.

Image cropping/resizing before sending to a server

I am searching for a solution that will allow a user to upload an image, crop the image, and then send the updated image to the server.
Basically, I would like to handle all the editing client side and only send the new, smaller, thumbnail to the server.
How can I do this? I have seen this is possible with Flash, but I am looking for alternative solutions.
Are you restricted to certain browsers? Using HTML5, here is a proof of concept from Anand Venkataraman. Demo is here.

Resources