Finally gave your plugin a shot. Initially, I was having trouble uploading to a directory, but once I switched it to another one, I logged in through FTP and found the files there.
Problem is, when I went to “Edit” and checked out the entries, the custom field I used for the file was not updated and was left blank.
I used this code for the SAEF, pretty much what you supplied in your initial post.
If it’s any consolation, I’m running ExpressionEngine 1.6.4.. Fields are uploading, just the field isn’t populated when I hit “Edit”.
Just to be clear on how this works.. I created a custom weblog field and made the the field type “Text Input” and popped a 384 character limit on it. After it’s created, I check the field_id for the designated field and apply that to the “name” of the field in an SAEF? Also, just inacse you need to know, I just updated to the newest version of EE and am attempting this upload as a Super Admin.
I’ve used the majority of your code provided (with one upload field rather than 2) and it still doesn’t seem to be populating the Text Input field that the ID corresponds to. When I upload a file, is my understanding correct in that it would automatically populate the field with something like this, {filedir_3}Image.jpg?
The images seem to upload fine, but they aren’t “sticking” to its respective field. Can’t really say what’s up, the usage is pretty self-explanatory, and the Change Logs in EE 1.6.4 doesn’t seem to far out there. Have you managed to get this working with 1.6.4?
UPDATE #1: Just saw your reply after I posted. I’ll take a look at that. By the way, when I mean “Edit”, I mean Edit as in the back-end administration panel rather than a Stand-Alone “Edit” Form. Will keep you posted.
UPDATE #2: Can’t seem to determine the cause. The files are certainly being uploaded to the specified directory without issues. Has anyone experienced issues with 1.6.4? I’m using the most generic SAEF as possible with the only custom field being dedicated to LG SAEF File Upload, but can’t seem to get the field to populate even though the file gets processed.
Also tried with a hidden entry_id field as suggested above; but I’m only working with an entry - not edit - form, so I’m not sure if I need it. In any event, its presence or absence didn’t make a difference.
I too am on 1.6.4. And, just so everything’s clear, the weblog/section I’m working with happens to be called the-weblog (it’s the blog on a site with many other sections) and the custom field ID actually is weblog-image.
Also, when I used the date format that was suggested earlier in the thread for the hidden date field, EE wouldn’t accept my entry, so I changed it to the default.
Leevi, you rock. That did it. It’s working like it should.
After spending all day wading through gigantor threads, trying out a few things, and finally deciding everything available was too complicated and I’d wait to see what 2.0 had to offer before letting users upload files, I stumbled upon this. Simple, elegant, to the point.
One quick question: I had to go into the SQL Manager and look at exp_weblog_fields to find the field_id. Is it anywhere in the “normal” part of the control panel?
Thanks for the great work man.. Without your modules, I wouldn’t be anywhere near as efficient (or inefficient, however you look at it.. Either way, it’s better than had I not had them). This is great.. I can’t believe it took so long for someone to push something out like this, but I’m glad you took a stab at it man!
It wasn’t really a hard extension to build but it has laid the ground work for something new and exciting I’m working on. Cna’t say much now… but its coming along nicely
cool functionality, though i’m hitting a speedbump; I can upload a file successfully to right directory, but the custom field entry in my weblog is now
{filedir_3}foo_file.aif
with the curlybraces and all. is this expected behavior?
end goal is to able to {exp:extract_url} the filename for other users to download, but right now that plugin seems to gack on the curlybraces in my custom field.