How can I upload a directory with subdirectories?

Comments

10 comments

  • Avatar
    Itay Taragano

    While Cloudinary supports uploading from directories (e.g., by dragging and dropping a folder), currently the folder structure isn't kept (e.g., isn't represented in the image's public ID).

    However, you can create folders in your Cloudinary account, then copy only relevant images into the corresponding folders.

    -2
    Comment actions Permalink
  • Avatar
    Juan Llado

    Thanks but I need to import around 1000 images... :S

    Mmmmm, I have to think in other workaround.

    Thanks!

    0
    Comment actions Permalink
  • Avatar
    Larry Eisenstein

    This feature is really needed.

    2
    Comment actions Permalink
  • Avatar
    Shawn GRegg

    Seriously 3 years later and this still isnt implemented, its a basic feature that I can download free opensource PHP scripts even that can provide the ability to drag and drop with folder structure.  Your platform is a management nightmare and could be resolved with probably less than a week of dev time from one developer on your team yet you have left your customers with crap html interface or extensive API scripting as the only option for hierarchical file management on a platform who's whole reason for existing is file management.  This alone is enough of a reason I don't know how your service is rated so well.  I am only here because a turnkey solution I purchased is integrated with your service, one of my first line of business is to un-integrate you from my platform.  This is terrible.

    3
    Comment actions Permalink
  • Avatar
    Raya Straus

    Hi Shawn Greg,

    Thank you for contacting us and the feedback.

    I'm sorry to hear you're not happy with the product. For any specific questions please open a support ticket at support@cloudinary.com or join our weekly office hours cloudinary.com/office_hours  

    Hope this helps, please let me know if you have any further questions.

    Thanks,
    Raya

    0
    Comment actions Permalink
  • Avatar
    Oliver Habryka

    Quick note that we too could use this feature. 

    0
    Comment actions Permalink
  • Avatar
    Ranie Santos

    The media library's handling of folders is very clunky.

    I went into my blog folder and tried to create a posts folder through the UI. Naturally I'd expect the new folder to be created in blog but no, the posts folder just went to the root and there seems to be no way to nest folders. This is very unintuitive.

    Why can't you make the media library just behave like a regular directory the same way web apps for online storage like Dropbox and Google Drive do?


    0
    Comment actions Permalink
  • Avatar
    Raya Straus

    Hi Ranie,

    Thanks for the feedback.

    We'd love to assist you in solving this. Can you please open a ticket at support@cloudinary.com with more information on your workflow. For example, adding more information on the blog platform you're using will be helpful.

    Thanks,

     

      

     

    0
    Comment actions Permalink
  • Avatar
    Blake Bullis

    Any update on this?  Is it possible using the API SDK to upload a local directory, and all of it's media in one call?

     

    0
    Comment actions Permalink
  • Avatar
    Itay Taragano

    Uploading from a local file can be done via a short script, for example, in Node:

    const cloudinary = require("cloudinary");
    const fs = require("fs");cloudinary.config({
    cloud_name: "<my-cloud-name>",
    api_key: "<my-api-key>",
    api_secret: "<my-api-secret>"
    });
    fs.readdir(".", (err, files) => {
    files.forEach(fileName => {
    cloudinary.v2.uploader.upload(
    fileName,
    { folder: "test4",resource_type:'auto' },
    (err, fileResponse) => {
    if (err) console.log(err);
    console.log(fileResponse);
    }
    );
    });
    });

    Having said that, we recently launched our CLI SDK, which supports bi-directional syncing between a local folder and a Cloudinary one. For more information:
    https://cloudinary.com/documentation/cloudinary_cli#sync

    1
    Comment actions Permalink

Please sign in to leave a comment.