So this is what i want to do.
I have an Image object ( http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/Image.html ) and i want that uploaded to the Blobstore.
So this is my problem.
The formpanel i'm trying to use only works when the user actually supplies a file directory, so there is no way i can give an image adress to the form to upload like this:
blob:http://127.0.0.1:8888/6276f066-d415-45f4-984b-e0f98c542c50
So my question is:
How would i be able to upload an image from such a source to the blobstore.
Is it even possible?
Any and all help is much appreciated.
Gwt's Image represents and <image> tag, which in turn represents an image loaded from server.
AFAIK, there is no way for javascript (and GWT) to get the data from <image> or Image, so consequentially it can not be uploaded.
Since the data for Image comes from server, why do you need to upload it back to server? If you are doing some selections, couldn't you just get the URL of the image and sent that to server?
Related
I'm using the image upload script with a backend URL to rename uploaded images stored on the server. It seems to work well with both file uploads and also drag-and-drop.
Without that backend handling you can paste images directly into the editor, but they get saved as base64 with the post in the db itself which is not great for a lot of reasons.
If I use the image upload script as I am now, it seems it blocks the pasting of images directly into the editor. That's safest, I guess, but I was wondering if there was a way of allowing it, but treating the pasted image like a drag-and-drop image, for example, so we could have the convenience of pasting images but still have them saved with unique filenames on the server instead of being embedded as base64 with the rest of the source of the post?
Thanks.
I am using GWT and the blobstore (GAE). The client uploads an image but I would like to resize this image (w:77px, h:110px) before to store it in the blobstore. I have followed this tutorial :
http://ikaisays.com/2010/09/08/gwt-blobstore-the-new-high-performance-image-serving-api-and-cute-dogs-on-office-chairs/
but it does not do what I want...(moreover, the scaling is done after obtaining the blob key, and I would like to store the image with the good dimentions...).
I will use anything usefull (html 5 file api, gwt upload wrapper, or server side resizing)... but I have no idea how to resize the image coming from a uploader (any code, explication or link to help please).
Thanks you,
Okay so I want to load a image from a URL in my app, however this image will need to be updated every month manually, therefore its not practical to have to submit a new update to apple every time the url changes. So does anyone no of a picture/file sharing site that would allow me keep the same URL for the image even when uploading a updated version of the image?
You can just use the same url for the image that you want presented hosted on your domain or a hosting site.
So something like
http://www.mydomain.com/appImage.jpg
That you always call to and always is the address of the relevant image. Basically the URL is just a location that you can store any image at.
Up to my knowledge, in order to achieve this you will need a static URL. So that means you'll have to buy a domain from a hosting service.
Or if not you can use Google Drive for this. But you'll have to do some more coding for this.
Try using Google Drive:
Upload a text file(*.txt) to your Google Drive and get a shareable link. Convert it to a direct download link.
Next save whatever your image as a String (base64); I have attached some interesting coding examples below.
Then give the file link to your app; download the file; read the String(base64) convert it back to image format.
When you want to update the Image convert it to a String; open the Google Drive; edit your file using Drive Notepad (Do not use
Google Docs) and simply save it Ctrl+S.
Useful Links:
Google Drive Direct Link Generator
Convert between UIImage and Base64 string
Converting between Image and Base64 string in iOS
Java BufferedImage to PNG format Base64 String
Convert image to base64 with java
Hope this helps.
I want to take a photo or pick a picture from iphoto library and then upload it to webserver.
Use imagePickerController I can only get a UIImage Object,I can't know it's file path or file type(png,jpg,etc.). I have google for a long time but still can't find a solution. Any one can help me? Thank You!
You need to get the raw data from the image. Take a look at questions like this one.
Then, just set the appropriate MIME type on your http request and shoot the data up to the server.
Is it possible to intercept image load requests in WebView before they are actually started and modify their URLs?
For example, I have
mWebView.loadUrl(myUrl);
In onLoadResources event I can see URLs, but I can't modify them?
The thing is I am working on application that loads html content from remote location. For some reason author excluded image path and in img src he just have file name. Existing iPhone application is using this html content and I assume the content is build the way that is the best for iPhone. So, I need somehow to figure how to alter these paths. For example, if I choose to download all images first, I would need to alter path and add file:///... in front of image.jpg name.
Thanks.
you can use onLoadResource although are not only images but any resource loaded like javascript and css