I've just watched the lib examples here... The thing is I am looking for a standard solution for GWT image upload as
A) Upload image to client app
B) Preview image in client app
C) Get image in base64 (from upload object) on client app
Is there such lib for GWT 2.3+ ?
You can use gwtupload. With Gwtupload you can upload an image,preview this image and see the progress bar with real information about the process (file size, bytes transferred, etc).
You can also choose from simple and multiple file upload.
Related
I need to send a file to a servlet which will then upload the file to google cloud storage.
I cannot upload the file directly from the JSP page, I need this action will be from the servlet.
I have tried so many things that I don't know what to paste here.
I have uploaded a file to google cloud storage(GCS), but GCS doesn't know what the file is and cannot open it.
I'm trying to cache PDF files on the user's device and open them within my app at a later time.
With this package: https://github.com/barteksc/AndroidPdfViewer
I use pdfView.fromUri(uri) which loads the file from the URL every time the page is loaded.
Is there a function I can use to cache these files for offline viewing?
Download the PDF yourself, using your favorite HTTP client API. Then, use fromFile() rather than fromUri().
I am using GAE to serve large files, and I can successfully serve mp3 using a simple blobstoreService.serve(key, res); If I put the resource url in the browser, the media control will appear and/or the media player will start, and the music will start before the download is complete.
However, when I put a mp4 url in the Chrome, the control appears but nothing happens. Here are what I have done:
no content disposition to avoid download. If I put the content disposition, then the browser will download the video.
I even used ffmpeg to convert the video and put -movflags faststart option there but no difference.
I also set the response header to Accept-Ranges:bytes to the first request and I have observed that the next request still asks for full 75MB range. Should I only serve partially even though the browser asks for all?
Or how to let the browser know that I wanted to serve piece by piece so the requests will have ranges. Is content-length necessary? Should I process the HEAD request? I believe right now my servlet only processes GET.
my url is like http://www.somesite.com/serve?folder=aa&file=ok.MP4 the Chrome console shows that only 1MB is downloaded and then it stopped
The html code looks like below except my GAE url is the src. The example mp4 works but if my gae link is there, it doesn't show video at all.
<video width="640" controls="">
<source src="http://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video>
Question
What exactly are needed to do on GAE server side to serve the video using streaming?
Answer
The marked answer has sufficient information on how to serve the mp4 file and it also gives a live web page for demo. From that demo, I was able to tell that my site could serve an mp4 file as long as the Chrome browser could decode it. The problem I encountered was due to the codec used in ffmpeg wasn't recognized by Chrome. Changed to H.264, everything worked fine.
Here is one example of the ffmpeg command line, where OK.MTS is the camcorder file, output1.mp4 is to be uploaded:
ffmpeg -i ok.MTS -codec:v libx264 -profile:v baseline -preset slow -b:v 500k -maxrate 800k -bufsize 1000k -vf scale=-1:432 -threads 0 -b:a 96k output1.mp4
Is your handler putting the correct Content-Type in the response headers? You need to be setting "Content-Type:video/mp4" for the video to play correctly.
Here is a test site I wrote on App Engine that plays mp3, ogg and mp4 files from Cloud Storage and the BlobStore.
Here is a link to an mp4 file in the BlobStore that uses serve() to return the file. When I paste this link into chrome the content plays correctly.
I have an ArrayList of Serialization objects on my handheld.
I found a solution to send it to my wearable device.
Can I send custom objects to Android Wear?
In my Object I have the URL of an image and in my handheld I am using Picasso to download the image from the URL (es in a ImageView).
Can I download the image in the wearable? (I think no).
Should I download all the images of the ArrayList in the handheld and send it putting them as assets in a DataMap?
You can't download images directly from the Wear as there's no direct internet access.
However you're on the right path by downloading images on mobile (e.g. using Picasso), then transferring them to the Wear via an Asset.
There's a tutorial with all the code required on how to send an image using an Asset in the Android training section:
https://developer.android.com/training/wearables/data-layer/assets.html
I am making an Uploader Which uploads Audio File
Now i want following things to be done:
Once File is Uploaded to Server an Applet should start on ServerSide
Name & other details of Uploaded content should be passed to Applet
Applet will process somethings on Audio & then PAss the Result to DB( Or Servlet )
My Question is that How to achieve such Applet-Servlet communication on Server Side.
It is Just similar to that of some Site which allows user to Upload Image & then They Process something (i.e. add Watermark, Resize extract detail etc) & then gives results. & I am trying same things ,but on Audio with the help of Applet & JSP-Servlet Which i have created.
Thanks in Advance.