Hmmm. Made that change to the extension and uploaded but still seeing full URL in the page. I created a new entry with a new image and cleared all the EE caches and browser cache. Is it possible I need to take something else out of that script?
UPDATE: just toying around with it and it looks like it will work if I take
out of this line as well:
$tagdata = str_replace(LD.$f['field_name'].RD, $f['url'].$field_data, $tagdata);
Think it’s working now 😊
Mark - When I click the red “minus” graphic to remove a file from an entry, no new “Browse” field appears in its place - the whole thing just disappears. If I preview the entry a new file field appears ready for uploading a new image.
This happens in FF 2 on both Mac and PC. Safari it works as expected. On IE6 (haven’t tested IE7 yet), clicking the delete button it actually throws an error and sends me back to the CP home page.
This is on the latest version of the plug-in without multiple uploads enabled on multiple EE installations.
When I click the red “minus” graphic to remove a file from an entry, no new “Browse” field appears in its place
Because of this scenario I’ve enable the multiple files setting even though I only output one file in the webpage. When i add a file a new file browse field appears; so, if I delete a file there’s always that next upload field already there. Otherwise, with the single image field setting then you have to save the entry after deleting the file, then afterward re-open the entry and add a new file.
Someone I was working with let me know they had an issue with being sent back to the CP home when trying to delete files. I use FF (1.5 /2.0) and no issues - I’m pretty sure though that they use IE though.
I’ve succesfully integrated this extension into the SAEF so users can upload multiple files. When they publish the article all files get stored in the db and show in the weblog they can post in.
But alas i can’t find a way to get the file extension to work when people use the preview link. All values in the the textareas and title field are shown but the files don’t get shown. Is there a way to get the file upload to work with the preview function in SAEF?
I’ve tried adding the File upload inside the custom fields parameter, but then the file upload field isn’t shown.
I’ve posted my code in the attached .txt. I hope somebody can give me some tips on how to get this thing to work.
Mark - Just got the “opportunity” to load a site using this extension on a Windows box. I’m getting the following error:
Warning: move_uploaded_file(d:/Customers/user1161275/www/eengine/d:\Customers\user1161275\www\_res\uploads\uploads\news\SuccessTips51-75_010807.pdf) [function.move-uploaded-file]: failed to create stream: Invalid argument in d:\Customers\user1161275\www\eengine\extensions\ext.file.php on line 500 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move ‘C:\components\shared\php\uploadtemp\php7498.tmp’ to ‘d:/Customers/user1161275/www/eengine/d:\Customers\user1161275\www\_res\uploads\uploads\news\SuccessTips51-75_010807.pdf’ in d:\Customers\user1161275\www\eengine\extensions\ext.file.php on line 500 Warning: Cannot modify header information - headers already sent by (output started at d:\Customers\user1161275\www\eengine\extensions\ext.file.php:500) in d:\Customers\user1161275\www\eengine\core\core.functions.php on line 293
The key thing is the sort of double-paths and forward slashes (which should be backslashes on Winders) that appear in the error. Possible to fix? A setting on my end I could change that would fix it?
I’m afraid this isn’t working for me. I’m on 1.5.2 - it all looks good on the backend but it’s not publishing anything to the site. It’s totally blank wherever I put the field - and when I go to edit the entry, the field is empty I’m hitting “update”, not preview or quick save. I tried a download from Mark’s site and from this thread (they were 2 different versions). I tried using a field that already existed and changing the type to “file”. When that didn’t work, I tried creating a new field. The only other extension that I have installed is “disable news feed”.
The interface is perfect - just what the file upload should be like. I just wish I could get it working!
ruraldreams, you’ll want to grab the latest version from the thread here. then once it’s installed choose your file and click update. make sure you create a new field as the “file” type just to be sure the DB is set up correctly. Also make sure you choose an upload location in the field settings. Are you getting any errors in your error logs?
Error logs where? Everything else I’ve done.
Edit: The upload doesn’t seem to be happening. The file I am uploading isn’t on my server. Is there supposed to be some sort of submit besides the “update” button for the entire form?
Here’s what the field looks like in my cp - does this look right?
On IE6 (haven’t tested IE7 yet), clicking the delete button it actually throws an error and sends me back to the CP home page.
I agree with jtnt on this - I just discovered the IE 6 behavior today at a meeting with the client. They were asking how they could replace the file if there is one there already. I said, “Click the minus, hit “update” (can’t use “Quick save” because we’re using a multi-relation field…long story found in another thread…), then click “Edit this Entry” to go back in, then browse for your new file, and hit update again. Easy as pie!”
Turns out they’re using IE6 (of course…) and when they click the minus sign, it throws them back out to the main edit page, without removing the file. It’s version 1.0.9 on an EE 1.5.2 install.
Also, yes, it would be nice when anyone clicking the minus, when this extension is set to Single File, would be presented with a new browse field immediately.
Anyway, as you know, little tweaks to modules and extensions and all, Mark is a hero!
Mark - You need to name this something other then “File”. Whenever I need to find this thread again, putting the word “File” into the search guarantees about 400 results. Maybe FilEExt? I don’t know…
No, but I didn’t really try either. I just reported the bug.
Mark did fix the issue I reported above regarding problems getting this to work on IIS. He says this will get included in a future release.
mark, thank You for all that great work on improving EE! I’m using firefox 2 on osX: I’m using it as a single image field and as long as I keep loading images from my local source, all works fine. But if I delete an Image from the file field, hit publish and afterwards choose another image from the server via the EE upload popup (URL button) and publish again, i’m getting a 404 “Url not found”. Maybe it can’t deal with the (filedir_x) supplied by EE? Thing is: the upload part of “File” is real easy for the less computer savy user, but as soon as they change their mind and want another image which is already uploaded it gets complicated. You know, that Files Extention of yours almost had it all covered, selecting with thumbnails feedback, add a choose/upload button and you have a great little file selector.