WordPress.org

Ready to get started?Download WordPress

Forums

Every user upload files to their respective directory. (3 posts)

  1. dem
    Member
    Posted 6 years ago #

    Specify a directory for every upload is one of my purposes right now. So i was wondering how to do this.

    Eg1: User1 wanted to upload an image, so he uploaded it, and then the file will be stored at /wp-content/user1/myfile.jpg

    Eg: User2 wanted to upload a video, so he uploaded it and decided to create a subfolder in his folder. So the video will be at /wp-content/user2/videos/hisvideo.mpg

    Those two examples are different. The second one requieres more implementation of course but it will be really nice if we can have acces to it.

    In fact, i was wondering to modify the code in the "upload" button and then make some kind of call to the_author and search for the folder of the_author.

    I don't have much time right now to play with the code... But i really was wondering if theré's a plugin for this or maybe someone can help me.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    http://wordpress.org/extend/plugins/custom-upload-dir/

    It won't let you make video subfolders, but you can put the author id in the directory path with its custom option.

  3. dem
    Member
    Posted 6 years ago #

    Ok Thk for the tip. I'll try this one. Some day i'll try to make subfolders :)

Topic Closed

This topic has been closed to new replies.

About this Topic