Where to save the uploaded files? - apache

I am developing a web application to upload .mp3 files and need to play them. I successfully uploaded the files and saving them in C:/uploads folder. I understand that as it's a web application we need to save them in the Apache web server it self. But I am not sure, where to save them.
Thanks,
Serenity.

You can use content repositories to store uploaded data, I think this is common approach. For instance, take a look at the Apache JackRabbit CR, applying it you won't easy look for uploaded files on hard drive, but you will have web interface, and also some other tools available to connect to repository and show you files there etc.
As alternative to JackRabbit, you can try Alfresco CMS, they both implement JCR, other implementations are listed here (you will them at the bottom of that page).

Related

Recommendations: Best Approach for simple file sharing app

Background:
UxD designer with no application development background, some experience with HTML/CSS creation, quick learner
Wants to build:
Simple file sharing application
User credentials required for access
Files will belong to one of a pre-determined category list
Files will be 2-5KB in size each (application should prevent uploading of larger files)
Users should be able to upload file and associate it with the appropriate category (overwriting existing files should not be supported)
Users should be able to browse all categories and download any file
Users will all be on Windows 10
Would like to leverage freely available file repositories (Google Drive, Dropbox, etc)
Application can be either desktop (Windows 10) or web-based (no hard-requirement .. just looking for the best/easiest option)
Future considerations: Community-based features. Ability to add file descriptions/comments/rankings to each uploaded file
Here are my questions:
What development platform(s) would be most suitable for the above objectives?
Is it possible to utilize Google Drive or Dropbox as a centralized file repository for this type of application?
What other considerations might I have overlooked?
What are the biggest limitations/show stoppers in creating the type of application I have described?

Show content of a zip file in a browser, rather than downloading it

I have a log server, where users upload archives and view their content online when needed. Currently the server unzips files, right after receiving them. Unfortunately, my peers consumed all the drive space I had. I can free up a lot of space, if there's a way of storing ZIP archives, but feeding them to users as HTML page (same as default Apache's file browser).
I know there are solutions relying on JS, like:
http://gildas-lormeau.github.io/zip.js/demos/demo2.html
https://stuk.github.io/jszip/
or I can unzip them on demand at server side and provide link to a temporary folder. However, some time ago I've heard a browser can view an archive content if proper headers are sent from Apache/nginx. Apache's mod-deflate doesn't help much here and I can't find other docs - perhaps it's not possible after all?
Cheers.

Alfresco webscripts File upload directly to alfresco repository

I've been going through CMIS model in general and how to use Alfresco as CMIS repository in Alfresco Wiki and Documentation(I installed 4.2d on Windows). I am confused about many things but here is what I need to know right now:
Is there any portlet webscript i.e something I can call from my application that opens like a popup or something close available that Alfresco provides to upload files directly to Alfresco repository. If not could anyone point me to the resources from which I could build one. I would like to access repository in CMIS way preferably. There is something in alfresco/services/cmissamples/upload. Can I use that?
I saw that each of the rest URIs can be appended with alf_ticket. But the thing is URIs work even without alf_ticket. How can I make it mandatory and how can I make folders of that user only to be available for browsing or uploading files.
Any links or examples of using Alfresco as only back end repository with own ui of the application will be helpful.
I found that many of the paths in docs/wiki are incorrect.
check this two links. It should give you good pointers on CMIS and webscripts-
http://22ecmoncloud111.blogspot.com/
http://sumantapakira.wordpress.com/
Alfresco provides file upload API to upload file. Please check following link which provides example and more details for the same.
http://basanagowdapatil.blogspot.in/2011/10/how-to-upload-file-to-alfresco-share.html
http://blog.mwrobel.eu/uploading-big-file-alfresco-web-services/

Can I find any free solution for storing my files online?

I am developing an application which needs to fetch some data from an XML file for the automatic update process and for some other functions. This approach requires the files to be located in a direct link, so it can be hard-programmed to use that specific URL.
I heard that you can use a lot of free-to-use file-sharing services such as Google Drive, Box and Dropbox. Can you tell me if it's true or not? And are there any other services beside those I mentioned?
I don't need a web hosting that supports PHP and other frameworks, I just want to store files and make my application access it when required.
Yes, both Dropbox and Google Drive provide web hosting of your public folders, but there is a 10GB bandwidth limit with Dropbox.
You can use any free web hosting like 110mb or 5gbfree too.
You can try github, bitbucket or mega.co.nz

Can we create a war file for a play2.1.1 application offline?

I have tried creating war file for a play2.1.1 application following the instructions given in the github link - https://github.com/dlecan/play2-war-plugin/
However it fetches the plugins files from online repository and its been referenced in the play program. This method works only if the internet is connected.
Can i download the actual plugin file from this site and save it in my local system and generate a play war file offline?
Partially Yes. You need to go online only once to get all the dependencies downloaded. Once you are done, then you can work completely offline. Also I would like to mention this link: http://brainstep.blogspot.in/2013/10/how-to-install-play-2-war-bare-minimum.html
There is no official way for doing this, but if that aren't to much files, you can use Fiddler Web Debugger to look what files get downloaded, save them to your hard disk and then activate Fiddler's Auto responder. Everytime the Application requests the Files from the Server, Fiddler replies with the Files on your Hard disk.