ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Change File Upload HTML

May 23, 2014 12:48am

Subscribe [2]
  • #1 / May 23, 2014 12:48am

    creativesherpa

    42 posts

    I couldn’t find this in the forums so apologies if this has already been posted or is somewhere in the manual.

    I am trying to change the resulting HTML after I use the File Manager to upload an image.

    Right now the result is something like this

    https://ellislab.com/asset/images/team-photo/image.jpg

    I would like to change this to

    https://ellislab.com/asset/images/team-photo/image.jpg

    taking away the ending slash.

    I’m guessing this is located in one of the .php files but where do I even start looking?

    Thank you.

  • #2 / May 23, 2014 9:15am

    Boyink!

    5011 posts

    Have you checked your File Upload Preferences?

  • #3 / May 23, 2014 11:44am

    creativesherpa

    42 posts

    Yes. I was hoping it would be there but, unless I’m not reading something correctly [and there is always a good chance of that being the situation], it appears that from that control panel I can add elements before after and even in the resulting file code but I don’t see a way to remove or edit the resulting code.

    http://ellislab.com/expressionengine/user-guide/cp/content/files/file_upload_preferences.html

    Basically if I use the File Manager to upload and then post and image the resulting code looks like this

    https://ellislab.com/asset/images/team-photo/image.jpg

    It works but I’m trying to get with the times and lose that last slash so that it results in this

    https://ellislab.com/asset/images/team-photo/image.jpg

    —-
    Side Note: I just discovered your book/website. What’s the best way to be notified when the e-book has been updated and is available again?

    Thank you.

  • #4 / May 24, 2014 8:10am

    Boyink!

    5011 posts

    The trailing slash never bothered me but if you wanted to bad enough you could use the file field tag pair at the template level to assemble the image link without it:

    http://ellislab.com/expressionengine/user-guide/add-ons/channel/custom_fields.html#id10

    I have a mailing list on Train-ee (subscription form in the footer) for book-related announcements.

  • #5 / May 24, 2014 8:58pm

    creativesherpa

    42 posts

    Captain’s Log 2014-0524: I thought I found the line.

    EE > fieldtypes > file > ft.file.php > line 454

    Removed the trailing slash. Nope. Nothing.

    The hunt continues.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases