Search code examples
phpcodeigniter-2openshift

How to get direct links to the files uploaded via script?


I'm able to upload files successfully via PHP to /app-root/data/

Now I want a direct link for the files uploaded so that we can download it via http (I mean my web application)

I want that "xyz.txt" is uploaded to /app-root/data/xyz.txt and need a direct link like https://app-name.rhcloud.com/data/xyz.txt

How can I do it? pls help


Solution

  • Solved, What I did is login to ssh console of my app and created a link like

    ln -sf $OPENSHIFT_DATA_DIR $OPENSHIFT_REPO_DIR/php/data
    

    And uploaded file's direct links are like https://app-name.rhcloud.com/data/???.??