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.

Safecracker FIle & Relative File Path Issue

March 09, 2011 12:42pm

Subscribe [6]
  • #1 / Mar 09, 2011 12:42pm

    jtnick

    29 posts

    Hi, we are having issues with Safecracker File and relative file upload server paths.

    If we use a relative path, no matter which file upload preference we assign to the field, it’s targeting the root of our server (it even picks up a couple log files we have sitting on our server’s root).

    If we hard-code the path, it works just fine.

    We are currently running a one config file setup for 3 server environments and are really hoping to use relative paths because of this.

    The standard File Manager works fine with both relative & absolute file upload server paths.

    Any ideas on how to get around this? The possibility of locking down a file path on the upload was the main reason we we’re wanting to move forward with safecracker file vs. standard file fieldtype.

    We are running EE 2.1.4beta and Safecracker File 1.0.3

    Thanks!

  • #2 / Mar 09, 2011 4:31pm

    Sue Crocker

    26054 posts

    Hi, jtnick.

    I’ve got several sites running with EE2.1.4beta, but for support, I need to have you test with 2.0 of SafeCracker. Can you upgrade and re-test? It may very well be a limitation of the product, and a Feature Request would be the way to go.

  • #3 / Mar 09, 2011 4:36pm

    jtnick

    29 posts

    Hi Sue,

    I am using the safecracker_file fieldtype from the Safecracker 2.0 module; looks like the file is still 1.0.3. Do I need to upload and install the Safecracker Module too?

  • #4 / Mar 10, 2011 4:36am

    John Henry Donovan

    12339 posts

    jtnick,

    No you have the latest and there is no need to install SafeCracker.

    A relative server path won’t work with the safecracker_file fieldtype presently.
    You are welcome to submit a Feature Request. Sorry it doesn’t suit your your dev needs at the moment

  • #5 / Mar 10, 2011 6:48am

    Jérôme Coupé

    122 posts

    jtnick,

    For what it’s worth, I have safecracker file 1.0.3 working with relative upload paths using the latest EE 2.1.3 Build (20101220)

  • #6 / Mar 10, 2011 6:49am

    John Henry Donovan

    12339 posts

    Jerome,

    To clarify, is that relative URLs or server paths?

  • #7 / Mar 10, 2011 6:52am

    Jérôme Coupé

    122 posts

    Hi John Henry,

    Both:
    The uploads dir is in the root of my site:

    Server Path to Upload Directory: ../uploads/uploadlocdir/
    URL of Upload Directory: /uploads/uploadlocdir/

  • #8 / Mar 10, 2011 6:54am

    John Henry Donovan

    12339 posts

    Jerome,

    Server Path to Upload Directory: ../uploads/uploadlocdir/

    That may be the difference. I was just using /uploads/uploadlocdir/ without the double period

    Let us know if that helps, jtnick

  • #9 / Mar 10, 2011 7:03am

    Jérôme Coupé

    122 posts

    JH,

    Indeed ;o)
    These posts contained interesting tidbits.

  • #10 / Mar 10, 2011 3:15pm

    Sue Crocker

    26054 posts

    Thanks for the assist, Jerome.

    jtnick, give what Jerome suggested a try and see if that helps.

  • #11 / Apr 15, 2011 12:31pm

    AJP

    311 posts

    Just encountered this problem as well.

    Found a bit of a problem, noted in this thread : http://ellislab.com/forums/viewthread/186588/

  • #12 / Apr 16, 2011 7:45am

    Greg Salt

    3988 posts

    Hi AJ,

    I’ll reply in your linked thread.

    @jtnick, how are you getting on?

    Cheers

    Greg

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

ExpressionEngine News!

#eecms, #events, #releases