Create a Database of Music Files on Local Folder Using HTML 5? - html

I want to get music file details like 'file name', 'song name', 'size', 'artist', 'length','ratings' etc.
This is required for my website.
The user should click a button on the site and a popup should come, where he can select which folder contains the mp3 files.
Then the popup program should create the necessary data and upload it to the server.
How can I do it?
Flash?
Is there a way to do it with HTML 5? Pure HTML 5? Without using Flash?

Flash could do some of this, and it is probably possible in javascript + html5 as it supports xmlHttpRequest, at least the file uploading part. You can also use your preferred languages' file class to read the contents of the file and get all the details that you can. You may have to resort to asking the user for the song name, album name, etc. you could attempt to grab the associated xml file that some programs like itunes provides, and then get all the rating data from the xml file.
Here's a link to an html 5 file upload tutorial: http://www.matlus.com/html5-file-upload-with-progress/

I created a Java program, which collected meta data from the songs. Then via a clever GET request, I pinged the webserver to save the data.

Related

How to run html with json files in SharePoint?

I am making SharePoint spaces for various departments in insurance company. One of them wants to save and share their outputs via SharePoint. That outputs are maps with risk areas. Because maps includes many data layers, all the files are in one folder.
I have uploaded a folder with CSS, JSON, JS and HTML files to the library in SharePoint, but when I doubleclicked on HTML file, the page will not load. I think it's due to the JSON files.
What I need is to run whole page correctly with simple doubleclick.
Can anyone give me advice how to run other files supporting HTML with doubleclicking on HTML file?
Thank you.
I've had this same issue. To get the HTML to play in the browser (without SharePoint trying to make you download it), you need to rename the HTML file to an ASPX file.
To do this, you need to be in the Windows Explorer view (from a document library, go Library > Open with Explorer). Then change the file name from index.html to index.aspx.
However, if you're also using JSON files, that could be an issue. SharePoint prohibits you from uploading JSON files unfortunately.

Can I use asp FileUpload to select a folder?

I need something like the FileUpload control in asp.net that will allow the user to browse for a folder and enter a file name of a new file to upload.
From what I've seen FileUpload requires a file to be selected. It seems that html input type="file" has the same requirement.
Thanks!
Selecting an entire folder is not possible in FileUploadControl as it is meant for a single file. Although you can have a Multi File Selection. Multiple File Upload User Control
C# has build-in FTPrequest class where you can create folders, upload files, delete files etc.
If you want to upload folders from a webpage, you cannot use this technology in the browser, then you will have to use a rich-client such as Java, Flash or similar plugin.
If you can provide the users with a Windows or Mac client, you can use C# (either .NET or Mono) for the FTP transfer.
ZIP files arent a problem for ASP.net nor C#, but you still only upload 1 file (zip-archive) and then its up to the server to unzip it using eg. C#. Look at 7-Zip which is opensource, then you might get some ideas too.
You could also just try and use the build-in lib for it (compression):
http://www.eggheadcafe.com/community/csharp/2/10050636/how-to-compress-and-decompress-file-in-c.aspx
or try this link...
http://www.aurigma.com/docs/iu7/uploading-folders-in-aspnet.htm

Play local mp3 with HTML5. How could save file reference to create a playlist?

I am trying to write a mp3 player using HTML 5 benefits. Play local file, until now, seems ok. Im writing sample codes based on these example : http://antimatter15.github.com/player/player.html
Here's the thing : I have to get the reference of each mp3 file. I want to get all this reference and save on database for when the client access the website i show this playlists. The problem is : doing in that way I mentioned before every time that client close/open browser the blob reference to file is not valid anymore. Iam looking for FileSystem API, that allows to save data into sandbox section. So, data could be cleaned every time users wanted and im still cant save mp3 references on my server database. Could you guys give me sugestions? The real thing is just save a reference from mp3 local file to allow my user create a playlist and every time that he access the web page he could see that playlists.
Thanks in advance,
http://www.html5rocks.com/en/tutorials/file/filesystem/
I doubt this reference(or "object URLs") persistence thing is intentionally unsupported by the browsers. Otherwise you could access the user's filesystem without his awareness. This could be a security problem.
As quoted at here:
Each time you call window.URL.createObjectURL() , a unique object URL is created, even if you've created an object URL for that file already.

Is it possible to convert an XML file created in actionscript to a FileReference object?

I have a working s3 uploader in actionscript that uses the FileReference class so a user can browse for files to upload when he/she clicks on the upload button.
I have a web application and I want the user to have his/her configuration saved to s3 as an XML file when they hit the save button, so the "save" button will trigger the upload. However, i cant figure out a way to add the XML file to the FileReference variable I create. I was looking at the File class but that appears to be only usable in AIR.
Is it possible to create a FileReference object based off of an XML file that actionscript creates within the application without browsing for a file using FileReference.browse(); ?
Thanks
The answer to my original question is "no". According to this article by Mike Chambers, you cant.
It is apparently a sandbox issue so that a malicious flash program will not be able to do anything related to saving files without a users permission.

A web-page that would provide a user to download a certain file from it, but would not disclose the location of that file - is it possible at all?

(I am sorry if my question is not in the right place. (I've been thinking for awhile and came up to the conclusion that this one is the best place for my question)
Is it possible to create such an HTML web-page that would provide a user to download a certain file from it, but would not disclose the location of that file (i.e. the user would not know the URL of the file that he is downloading).
If yes, would you, please, give me some directions as to which HTML code I should use to create such a page.
The HTML page would provide a link to a server side script passing a filename or other unique moniker:
Download Now
The script would read the identifier, derive a full path from it, load the file and write it back with the appropriate headers/mime type causing the browser to prompt the user with the normal download dialog.
The only location data available to the user would be the link to the script - which would - unless you add some security - serve back the file just as if it were a standard url pointing to a file.
(PHP Example)
With pure html, no. But with a serverside script (php, c#, vb, perl, or other) yes. You would stream the file to user. In that case just the serverside script has access to the origin files