Title: How does uploads work?
Last modified: August 19, 2016

---

# How does uploads work?

 *  [carlla](https://wordpress.org/support/users/carlla/)
 * (@carlla)
 * [16 years ago](https://wordpress.org/support/topic/how-does-uploads-work/)
 * Does anyone know if a new attachment is only a new wp_post record?
 * I am trying to do an automatic upload engine. But my images isn’t opening like
   the other normal attachments. I can access normal wp attachments by “pagename/
   imagename”. But this structure seems not work for automatic attachments. Every
   new image is being redirects to 404.
 * So I decided to ask it on forum to understand the proccess to create a new attachment.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years ago](https://wordpress.org/support/topic/how-does-uploads-work/#post-1439920)
 * Not much help here but to maybe show you a plugin that might help understand:
 * [http://wordpress.org/extend/plugins/add-from-server/](http://wordpress.org/extend/plugins/add-from-server/)
 *  Thread Starter [carlla](https://wordpress.org/support/users/carlla/)
 * (@carlla)
 * [16 years ago](https://wordpress.org/support/topic/how-does-uploads-work/#post-1440091)
 * Thank you very much for your help =)
 * **I tested it and that is what happens:**
    When we upload an image through add-
   from-server tab, the new image is attached to the page and the image appears 
   on gallery tab. Looking at the new attachment entry on wp_posts table I noticed
   that post_parent field was setted to the page’s id I am editing. But I still 
   can’t access the image through _pagename/imagename_ permalink.
 * Whether I insert this new image on page I can access the image through _pagename/
   imagename_.
 * **So what I find is:**
    A new wp_post entry isn’t enough to create a new attachment,
   and the page_parent field value isn’t enought to WP find the image through the
   post permalink.
 * So,** what else** happens when an image is attached to a post?
    – upload file
   to server – new post entry where post_type is ‘attachment’ and post_parent is
   page’s id which we are editing – ? (what else?)
 * I still looking for a way to create a permalink to access my images. Any help
   is very appreciated. =)
 *  Thread Starter [carlla](https://wordpress.org/support/users/carlla/)
 * (@carlla)
 * [16 years ago](https://wordpress.org/support/topic/how-does-uploads-work/#post-1440099)
 * It’s not making any sense for me.. can anyone help?
 * Once a wp_post entry looks like another one (only changing the fields id and 
   post_name), what can take WP find an attachment by name (_domain.com/pagename/
   imagename_), but not the other one?
 *  Thread Starter [carlla](https://wordpress.org/support/users/carlla/)
 * (@carlla)
 * [16 years ago](https://wordpress.org/support/topic/how-does-uploads-work/#post-1440117)
 * [@michaelh](https://wordpress.org/support/users/michaelh/): Do you know why an
   image listed in gallery tab (when editing a page), but not inserted yet, cannot
   be accessed by a permalink but another image which had already been inserted 
   on this same page can be access by a permalink?
 * I mean, what does WP check before load the image.php? What is the diference on
   database between those two images?
 *  Thread Starter [carlla](https://wordpress.org/support/users/carlla/)
 * (@carlla)
 * [16 years ago](https://wordpress.org/support/topic/how-does-uploads-work/#post-1440120)
 * Nobody knows answer me? =( really?
 * Where else can I get some help with it?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘How does uploads work?’ is closed to new replies.

## Tags

 * [attachment](https://wordpress.org/support/topic-tag/attachment/)
 * [image.php](https://wordpress.org/support/topic-tag/image-php/)
 * [permalinks](https://wordpress.org/support/topic-tag/permalinks/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [carlla](https://wordpress.org/support/users/carlla/)
 * Last activity: [16 years ago](https://wordpress.org/support/topic/how-does-uploads-work/#post-1440120)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
