# Is this even possible? grab metadata from mp3 from the beginning of an upload!

**URL:** <https://www.ruby-forum.com/t/is-this-even-possible-grab-metadata-from-mp3-from-the-beginning-of-an-upload/182531>\
**Category:** NGINX\
**Created:** [January 29, 2010, 12:27pm UTC](https://www.ruby-forum.com/t/is-this-even-possible-grab-metadata-from-mp3-from-the-beginning-of-an-upload/182531 "2010-01-29T12:27:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saimon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7cd45c/32.png) [@saimon](https://www.ruby-forum.com/u/saimon)\
**Post date:** [January 29, 2010, 12:27pm UTC](https://www.ruby-forum.com/t/is-this-even-possible-grab-metadata-from-mp3-from-the-beginning-of-an-upload/182531/1 "2010-01-29T12:27:35Z")

</div>

My boss has asked me for the following features:

- Have uploads of mp3 tracks to our service be made asynchronous
- Immediately allow editing of the track form
- Grab the tracks metadata (i.e. from the file header) from the  
beginning of the upload to prefill the form

My initial reaction was that it wasn’t possible but I decided to ask  
around to see if other had any other ideas. Would this be possible  
perhaps via chunked transfer? Or perhaps some custom flash?

The reason why I’m asking here is that I recognize it could be made  
possible with a custom nginx module I guess.

Regards,

Saimon

---

<div class="post-metadata">

**Author:** ![saimon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7cd45c/32.png) [@saimon](https://www.ruby-forum.com/u/saimon)\
**Post date:** [January 29, 2010, 12:45pm UTC](https://www.ruby-forum.com/t/is-this-even-possible-grab-metadata-from-mp3-from-the-beginning-of-an-upload/182531/2 "2010-01-29T12:45:09Z")

</div>

On Fri, Jan 29, 2010 at 12:01:26PM +0100, Saimon M. wrote:

> My boss has asked me for the following features:
> 
> - Have uploads of mp3 tracks to our service be made asynchronous
> - Immediately allow editing of the track form
> - Grab the tracks metadata (i.e. from the file header) from the  
> beginning of the upload to prefill the form
> 
> My initial reaction was that it wasn’t possible but I decided to ask  
> around to see if other had any other ideas. Would this be possible  
> perhaps via chunked transfer? Or perhaps some custom flash?

As the ID3 tag of an mp3 file is at the end, I guess you’re SOL unless  
you implement it client-side (IIRC it’s a fixed-length structure at the  
very end of the file; comes in two major versions). Probably a flash  
uploader will be required.

> The reason why I’m asking here is that I recognize it could be made  
> possible with a custom nginx module I guess.

I’m not sure the web server of choice is of any relevance here, but to  
keep on topic you may wish to have a look at the wiki:

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

Best regards,  
Grzegorz N.

---

<div class="post-metadata">

**Author:** ![saimon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7cd45c/32.png) [@saimon](https://www.ruby-forum.com/u/saimon)\
**Post date:** [January 29, 2010, 1:54pm UTC](https://www.ruby-forum.com/t/is-this-even-possible-grab-metadata-from-mp3-from-the-beginning-of-an-upload/182531/3 "2010-01-29T13:54:14Z")

</div>

Thanks Grzegorz…

I should have investigated id3 location first.

Custom flash looks like the only possibility right now…

The reason I mentioned the server was a stupid thought of doing two  
uploads, the first to extract the id3 data and the second to actually  
upload the whole file but this while I still assumed id3 was at the  
beginning of the file.

Anyway, thanks again.

On Fri, Jan 29, 2010 at 12:44 PM, Grzegorz N.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > perhaps via chunked transfer? Or perhaps some custom flash?  
> > keep on topic you may wish to have a look at the wiki:  
> > [mailman.nginx.org archive](http://nginx.org/mailman/listinfo/nginx)

–  
Saimon M.  
Freelance Web D.  
(Available for hire - For details visit [http://saimonmoore.net](http://saimonmoore.net))

Skype: saimonmoore  
Yahoo IM: saimonmoore  
Google IM: saimonmoore

---

<div class="post-metadata">

**Author:** ![saimon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7cd45c/32.png) [@saimon](https://www.ruby-forum.com/u/saimon)\
**Post date:** [January 29, 2010, 8:20pm UTC](https://www.ruby-forum.com/t/is-this-even-possible-grab-metadata-from-mp3-from-the-beginning-of-an-upload/182531/4 "2010-01-29T20:20:35Z")

</div>

> As the ID3 tag of an mp3 file is at the end

ID3v1 is located at the end of the file, ID3v2 is located at the  
beginning  
of the file and it’s been in use for over a decade now, so Saimon  
shouldn’t  
have problems with that. Just keep in mind that neither of tags is  
required.

Best regards,  
Piotr S. \< [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) \>
