Dane nails it, to get multiple downloads just drop allow_multiple=yes into your Image Properties.
It would be even nicer if it was a check box for multiple image in settings for an individual custom field. At little less cryptic and perhaps easier to remember when troubleshooting.
(So when is EllisLab going to buy this thing, give Mark tons of money and built it into EE?)
{[custom_field]}
{file_url}
{/[custom_field]}
I was trying this, after I realized the file extension outputted the link lol, adding the rel tag is clear now!
However, when I add the tags above, the tags show
{[custom_field]} http://www.bkdesign.ca/pathto/song2_1.mp3 {/[custom_field]}
In the article exactly as above. The field name is file_ext so it shows the url but the custom fields part shows in code,,, (I have 2 files, so tried showing both, or even one) One shows if I use the field tag alone ok. So tried:
{[custom_field]} {file_url} {/[custom_field]}
Template shows code not file exactly as above…??
You’d be correct in assuming that I’m running on a shared server. But I assume so are alot of other people? The settings are…
open_basedir VIRTUAL_DOCUMENT_ROOT:/usr/local/lib/php:/usr/local/lib/ph:/home/ilisys/phplib/ safe_mode Off safe_mode_exec_dir /usr/local/php/bin safe_mode_gid Off safe_mode_include_dir no value
rick.prince - The problem is open_basedir
does not allow me to @copy()
the uploaded file out of your /tmp
directory because it’s not within your open_basedir
. I wrote the upload script with @copy()
because I perform all the resizing/shuffling within the /tmp
directory, however this doesn’t seem to be the best approach so I’ll revert to the, probably, preferred method of @move_uploaded_file()
for 3.0.1.
This might be a long shot, but would there be any interest in developing this further to give some feedback during the upload?
I realise that the upload takes place on the entry submission so maybe there is too much to change for this, but I’m just setting up a video upload weblog and it would be great to get some feedback on the upload rather than just waiting for a loading icon to stop spinning.
I saw these two:
http://www.srmiles.com/freestuff/ajax_file_uploader/ http://swfupload.mammon.se/
The first one gives file size and speed which is nice. I know this is overkill for images, but for upload PDF’s and videos it would be a great addition (as FTP for the end client isn’t going to be the best idea).
Dane Thomas - That’s a possibility, and something to look forward to in an upcoming release, maybe 3.1.1? I don’t know if I’ll use Flash, but you can certainly expect an AJAX-ified spinner during upload.
Hiya,
Just to drop in my two penneths worth on this one.
Mark first of all your extensions are fantastic so thanks for those!! 😊
I would love to see an AJAX upload utility in place and think that the real boon for use would be from within an SAEF. I don’t think that in the EE control panel there is really any call for it but in an SAEF it would be fantastic. I can see an issue with it though and not too sure how you would handle it Mark?
I think the main problem would be :
Would this be in a pop-up window or would it work in the same window? I would personally love for it to be in the same window. What I would love to have happen is the person fills out the SAEF. If they try to submit the form without the file chosen then they would be warned. There could be the option here to allow the person to carry on or halt the form sending process altogether. Next up if they have to choose a file then they would click on choose and the standard dialogue box would come up asking for a file. They would choose the file and as soon as they have done so it would start uploading and show a progress bar. I think the most important thing here would be that there would need to be something in place that would allow them to delete the upload as it is going if they realised that they had chosen the wrong file or something. If the file did get all the way and upload then they would be presented (on the same page) with a small (configurable) thumbnail that would show them the file they just uploaded (very useful for images). They could then see if this was definitely the one they wanted. At this point they could still delete the file if needed.
Once they have chosen a file then they could submit the form.
I think if it worked in this way then all bases would be covered and should stop most problems that may arise from doing it in this way with an AJAX up-loader. As I said before I’m not too sure if this would be totally necessary in the control panel but with SAEFs this would be absolutely fantastic.
Hope you can add in all these options to it Mark as it will be one beast of an addition if you could.
Just my thoughts though! 😊
Best wishes,
Mark
svh1 - You can set up separate Upload Locations for each field, meaning you could have different settings for each field. As for setting the file size limit, within each Upload Location you can set the `Maximum File Size (in bytes)` which will limit what’s uploaded to each field.
OK but I guess I’m confused on where these settings are. Do I put them in the tag itself, are they in the settings panel in Admin › Utilities › Extensions Manager, or do they show when I choose “File” when creating a new custom field? I know I could go find out myself but I am running 2.1.0 and don’t want to dink anything up without at least first knowing the direction I should be headed. 😊
rick.prince - Unfortunately that won’t work because I perform some modifications on the uploaded file before it’s copied. By doing so, PHP doesn’t think the file is a valid upload and therefore move_uploaded_file() doesn’t work. To fix this I’m going to move the copy/move_uploaded_file command higher up in the code and perform the checks on the copied file, not the raw upload.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.