We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

File

Development and Programming

Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

hum…not currently, but it’s something to think about for the future. If you’re into hacking your own version you’d want to place some code at the top of the publish() function. Something to this effect:

if($row['field_ta_rows'] == 1)
{
$this->settings['allow_multiple'] = 'yes';
}
else
{
$this->settings['allow_multiple'] = 'no';
}

Then when setting your file field, before saving, switch it to a text area and set the rows to 1 if you want multiple uploads or anything else if you don’t. Oh, and don’t forget to switch it back to a file field before saving.

       
Helmi_xisnet's avatar
Helmi_xisnet
71 posts
18 years ago
Helmi_xisnet's avatar Helmi_xisnet

Thanx for the reply. I guess i’ll wait for the update; not too comfortable to hack into EE’s function 😊

       
Helmi_xisnet's avatar
Helmi_xisnet
71 posts
18 years ago
Helmi_xisnet's avatar Helmi_xisnet

Hi Mark, may I add another suggestion for future versions?

I would like to have the capability to name the file so that when viewed on the webpage; it will shows the name of the file; instead of this_is_the_file.pdf.

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

Helmi_xisnet, I’m wary to do this because it takes away the simplicity of the extension. If you need to name files there’s a good chance that you’ll need additional information, which probably means the file deserves it’s own weblog and an associated “relationship” to the calling entry. Also if you’re looking for just a title, why not add another text field above or below the file upload to hold the title.

       
Helmi_xisnet's avatar
Helmi_xisnet
71 posts
18 years ago
Helmi_xisnet's avatar Helmi_xisnet

Thanx Mark for the reply. I think I’ll follow your suggestion.

       
Jamie Pittock's avatar
Jamie Pittock
108 posts
18 years ago
Jamie Pittock's avatar Jamie Pittock

Hey Mark,

Finally playing around with this extension. Just using it in single field mode.

Once you’ve uploaded a file is there no better way of uploading a new file in the same field other than clicking the delete icon, saving the entry, and then going back into it?

       
Rob Quigley's avatar
Rob Quigley
236 posts
18 years ago
Rob Quigley's avatar Rob Quigley

I use a workaround for what you want to do smallbeer. In the “File” settings I use the multiple images selection which displays multiple upload fields in the entry form even though I do not use the multiple image tags in the template.

You can then upload a secondary image and delete the original choice at the same time and then resave your entry without having to do multiple entry saves and essentially swapping one image for the next without having an image disappear in your HTML output in the template.

       
Jamie Pittock's avatar
Jamie Pittock
108 posts
18 years ago
Jamie Pittock's avatar Jamie Pittock

Thanks Rob, I thought about something like that but I’m always weary about whether these workarounds are client safe. I prefer things that just work.

And Mark, that’s not a dig at your extension or the work you’ve put in btw.

       
Mikee Bee's avatar
Mikee Bee
179 posts
18 years ago
Mikee Bee's avatar Mikee Bee

Mark, is there any way of having a warning if the file you are uploading already exists?

Thanks

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

Alright, I’m trying something out here: I’ve uploaded a 2.0 version of the file extension to the top of this thread. Most things are the same, except it should alert you if there’s a problem uploading and you should be able to remove/add a file without saving the entry in-between. This isn’t a ‘beta’ release, it’s a final release of 2.0, however because there was some concurrent development of the two versions, I’m a little worried I forgot something in 2.0. So if you’re having trouble with the 1.x version or are looking for those error messages try out 2.x and let me know what you think!

Thanks everyone.

       
Mikee Bee's avatar
Mikee Bee
179 posts
18 years ago
Mikee Bee's avatar Mikee Bee

Am I ok to copy over v.1 with the v.2 files without messing up existing entries?

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

It shouldn’t mess up anything but I would certainly test it on your own development box before it get’s anywhere near live data.

       
Mikee Bee's avatar
Mikee Bee
179 posts
18 years ago
Mikee Bee's avatar Mikee Bee

Thats great Mark thankyou

Did you mean to include the subversion files in there me old mucka?

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

Nope, you can ignore those. Silly OS X hiding my importing files :-(

Mark.

       
Rob Quigley's avatar
Rob Quigley
236 posts
18 years ago
Rob Quigley's avatar Rob Quigley

I just installed ext.file_210.zip files and love the additions!! Nice work. I especially like the preview thumb - very handy. I did notice in the settings it takes a server path and site url. What does it use these for if the settings piggy back on EE’s directory settings when creating custom fields? Is this for the thumbnail directory creation/storing thumbs in a seperate folder?

Thanks Mark!

       
First 5 6 7 8 9 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.