Java web application with S3 File Manager - java

I am working on a web application based on Java/JSP and I need to include a web based file explorer that connects to an Amazon S3 bucket that can handle the basic file explorer tasks such as upload, delete, rename and navigation. Any suggestions would be appreciated.

have you tried simply creating a wrapper to wrap around s3cmd ? that would be the ultra lazy way to do it. since then all the protocol handling is done for you and all you have to do is feed/parse its input and output
S3cmd is extremely well documented and pretty simple to use.

Related

JavaFX - file (video) upload

I asked this question before but it was unanswered for a week or so I think so I decided to ask again but with a different formula.
I have a JFX desktop app. one of the features of one of the modules contains a video upload to the server. I searched this around a lot but the solutions I found are in two categories
using servlet / jsp on the server and service in the desktop app
copying the file locally (not what I want)
now I am ok with havign a service doing it the upload that's what I expect but I dont see the need of having a deployment on the server plus I already have a webapp. Is it possible to just have a webservice in the server and call it in the desktop app code? I haven't found anything on this.
Yes, it's possible and preferable choice.
The potential solution I see would be:
deploy a file REST service on your File server where the videos would be held.
Example Rest service in Java: https://github.com/polopolyps/fileserver
Then in your java FX application you simply send user file (a video) using REST lib, see: http://square.github.io/retrofit/
and Voila you have your functionality.

How to rewrite csv file on client with java web application

I am new in java web application, (Java EE, JSF).
I tried to change the contents of a csv file on the client computer with a java web application, so that the client does not have to download a new file, because the file is already in the set to be used for applications in the client. so I just wanted to rewrite the csv file.
Could it be done in java web application? If yes, please give me an example. I am very grateful if there is a better solution.
No, absolutely not. You can't change the contents of a file on a client computer from a web browser. The best you could do is have them upload a version of a file and then send them another version to download. Giving write access to the filesystem would be a massive security hole.
Place the CSV on a network share somewhere. The client can edit it, the back-end server can edit it. Requires more infrastructure, of course, but may work depending on the type of application.
Not that I think this is what you want, but if the 'client computer' was also acting as the server (i.e. was the host running Jetty/Tomcat/whatever), then you could modify files on it using the java IO api.
Again, very likely not what you want, just saying it would work.

Java or PHP Applet to download groups of files from Amazon S3

I have a website that provides a photo service for clients. I want to use Amazon S3 as the storage space for all the photos but am having trouble interacting with the S3 buckets. What I need to do is give my customers access to all their photos sitting in their S3 bucket. I'd like to give them a visual display of all the images and then allow them to select a group or all of the photos for download. I'm assuming a Java applet is needed to handle this interaction. Does anyone know of a java based downloader that will interface with S3 or could possibly build one?
We've also thought of all or a group of files that reside on S3 but can't figure out how to zip files while they're on S3.
Any help is much appreciated!
I suppose when you mean by java based downloader you're talking about web services, sincerely I don't know much about Amazon S3 web services, but I do know they exist, and what I'd advise is to first get to know the Amazon web services, try to find if there is any web method to download the files (my bet is that it has to be a bit per bit download)
Concerning java applet you would only need it if you want to upload files, because of the existing security.

Is there any way to browse local files in Google App Engine other than using FileUpload class?

I'm writing a program that will be hosted on GAE that can upload and process local files. The program needs to process the file on the server side, and then return it to the client side. Previously I used JFileChooser for that purpose, but found out that it's not supported in GAE. I did some research and found FileUpload class, but it seems like it can't return the data to the client side. I could just let the user type the path of the file, but that would be just bad usability.
Any ideas are appreciated! Thanks.
GAE may not support JFileChooser directly, but it is apparently possible to embed applets.
Since that is the case:
A digitally signed and trusted applet can show a JFileChooser.
A sand-boxed applet deployed in a Plug-In 2 architecture JRE (e.g. Sun's 1.6.0_10+) can be launched using Java Web Start and use the services of the JNLP API. The JNLP API offers the FileContents object by way of the FileOpenService. Here is a small demo. of the file services of the API.
You can't upload files to appengine in the conventional way. There is no filesystem. You have to serialize them into the datastore.

Java Applet to manage file uploads to server

Looking for a descent looking Java File Upload Applet (or even Flash) that fits the following requirements:
Free/cheap (yes looking to use in a commercial web application)
Preferably allow multiple file selection
Ability to create/edit folders on destination server? (within a secure root folder)
Ability to overwrite files in the destination directory?
IE + Firefox support required... Safari, Chrome, etc. a bonus
Ability to "hook" into the flow to apply additional logic
Notes:
In particular I'm looking for the ability to upload to a directory on another server (e.g. not where my web server or app server is running)
The destination server has a shared drive where all users of the app have permission to store files.
By "decent looking" I'd really, really like to avoid a UI that is "skinned" like this:
(source: swtguibuilder.com)
Before I'm shut down for "not programming related" I would need to be able to hook into such an applet to apply some additional permission logic etc. I don't want to re-invent the wheel if someone else has made a component that already does what I need.
This is relatively easy with Java. Look into Apache Commons Fileupload for the server-side code. For the front-end, there are many examples of flash-based file uploads.
The simple answer to your question used to be Flash. Since the release of Flash Player 10 it isn't anymore. Adobe has added a restriction on File upload which only allows a file to be uploaded in the scope of UIA - User Initiated Action. This means that a file upload must be started with a mouse click.
There are some of free file uploaders built in flash available. The only problem is that the queuing is broken by FP10. Adding the files to the pending uploads list is no problem. Starting the upload is no problem either. But when one file upload is done and the next should begin, Flash Player will not allow it if you don't click again which is pretty much useless.
There at least two requirements:
Applet file uploader These are available, e.g.: http://sourceforge.net/projects/jupload/
Widget to configure destination This is unusual in my experience, but I wrote one once for a Swing app which would be similar for an applet. It was necessary to provide the user a view of the remote file system, enable manipulation of the view, and then upload the changes. Note that there are transactions issues here, so it's not trivial.

Categories

Resources