PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

how to mask whole url and just give filename when user upload their file

  1. Ariel.Snapp
    Member

    Hi,
    I want to mask the full file uploaded url and just want to give filename. How can I do this?

    Posted 12 years ago on Friday April 6, 2012 | Permalink
  2. Ariel.Snapp
    Member

    any update on this?

    Posted 12 years ago on Tuesday April 17, 2012 | Permalink
  3. David Peralty

    Can you give me more details on what you are trying to accomplish please?

    Posted 12 years ago on Tuesday April 17, 2012 | Permalink
  4. Ariel.Snapp
    Member

    In a Gravity form there is an option of File upload which I am using. And on the front end I am displaying the data whatever user has submitted through this form in a form of a Post. Now under this post description page , the File which is being uploaded by user shows full URL like:
    http:/mysite.com/wp-content/uploads/gravity_forms/4-029b18596def1280a787b9aeb748707d/2012/04/filename.
    And I dont want to display this whole path instead just the Filename. how can I do this?

    Thanks

    Posted 12 years ago on Tuesday April 17, 2012 | Permalink
  5. Ariel.Snapp
    Member

    did you got what I am trying to achieve?

    Posted 12 years ago on Thursday April 19, 2012 | Permalink
  6. David Peralty

    I did, and it will require some PHP code to achieve this. Basically not a Gravity Forms issue anymore, you'll have to change how the data is displayed. How are you displaying the file location in your theme? You are most likely going to have to write a function in your functions.php file to grab the URL and parse out the piece you need before displaying it on your theme.

    Posted 12 years ago on Thursday April 19, 2012 | Permalink
  7. Ariel.Snapp
    Member

    ok got it.

    Posted 12 years ago on Thursday April 19, 2012 | Permalink