[FX.php List] JQuery and posting image-upload forms
Steve Winter
steve at bluecrocodile.co.nz
Thu Aug 18 14:57:42 MDT 2011
Hi all
There are a couple of steps to get this to work as simply as possible.
In your source for the demo, probably something like
/Library/WebServer/Documents/devCon2011/07fileUploads
locate the folder
/uploadedFiles
this may be a symlink to
/opt/uploadManager/files
if it is, break the symlink by typing
rm uploadedFiles
You may need to be root to do this, so you may need to 'sudo' before that above command.
This should remove the symlink, and may also remove the folder. If it does remove the folder, recreate it
mkdir uploadedFiles
Then change the owner of that to your web server user, usually _www
chmod _www:_www uploadedFiles
(again you may need to be root to perform these operations)
No open
07fileUploads/assets/includes/config.php
and in that file locate the setting
define('uploadPath', '/opt/uploadManager/files/');
which is most likely on line 53
Modify that so that it points to the folder above, which will most likely mean you need
define('uploadPath', '/Library/WebServer/Documents/devCon2011/07fileUploads/uploadedFiles/');
Hope this resolves things... if it still proves to be an issue, I can create a new package an upload it tomorrow...
Cheers
Steve
> There are some issues with the Devcon example files and where the upload folder should be created.
>
> Steve and I have been discussing it off line but I think it might be good if mentioned here also.
>
> He recommends creating a folder /opt/uploadManager/files/ but Snow Leopard Server does not have an /opt directory at all so I'm still looking for the best place to put the uploads.
>
> Bruce Robertson
>
>
> On Aug 18, 2011, at 1:00 PM, Steve Winter wrote:
>
>> No worries Dale, hope it's helpful :-)
>>
>> There's lots of other good stuff in that package was well if you care to go digging, particularly in the higher-numbered folders...
>>
>> Cheers
>> Steve
>>
>>> Steve,
>>>
>>> This looks great - thanks for sharing!
>>>
>>> Dale
>>>
>>> On Aug 18, 2011, at 11:42 AM, Steve Winter wrote:
>>>
>>>> And I should have given you the right URL: http://msdev.co.uk/devCon2011
>>>>
>>>> I think your man Joel has also worked with the same library for doing drag and drop uploads in the past ;-)
>>>>
>>>> Cheers
>>>> Steve
>>>>
>>>>> That sounds like a plan; see, I *should have* been in your session!
>>>>>
>>>>> BP
>>>>> bob at patin.com
>>>>>
>>>>> On Aug 18, 2011, at 11:38 AM, Steve Winter wrote:
>>>>>
>>>>>> Have a look at the fileUpload code from my devCon session - grab the files from http://msdev.co.uk/devCon - in there you'll see a drag and drop file upload method which can be used to send files via Ajax... thereby staying in the same page... it's based on work from http://github.com/valums/file-uploader
>>>>>>
>>>>>> Cheers
>>>>>> Steve
>>>>>>
>>>>>>> Hi Bob,
>>>>>>>
>>>>>>> I'm pretty sure you can not use ajax techniques - staying on the same page and reload a portion of it - to upload files. Upload requires a page reload. I think it's a security restriction on AJAX-type server calls.
>>>>>>>
>>>>>>> There are ways to fake it using iFrames and other techniques. I bet JQuery has plugins to handle such things.
>>>>>>>
>>>>>>> Dale
>>>>>>>
>>>>>>> On Aug 18, 2011, at 11:02 AM, Bob Patin wrote:
>>>>>>>
>>>>>>>> Well, I do know about submitting with Javascript, but my goal is to stay within the same page for everything on this web application.
>>>>>>>>
>>>>>>>> So my quesiton is this:
>>>>>>>>
>>>>>>>> I have a page called index.php that loads various pages into a DIV; in this case, it's a page called "upload.php" that I would use to upload documents.
>>>>>>>>
>>>>>>>> Can I submit a form from "upload.php" and stay within this DIV the entire time? I could just load an exterior page, perhaps in another window or tab, but I'm trying to avoid that and have hte entire web app work within this one page (index).
>>>>>>>>
>>>>>>>> Does that make sense?
>>>>>>>>
>>>>>>>> Bob
>>>>>>>> bob at patin.com
>>>>>>>>
>>>>>>>> On Aug 18, 2011, at 10:24 AM, Steve Winter wrote:
>>>>>>>>
>>>>>>>>> Hi Bob
>>>>>>>>>
>>>>>>>>> Then that is using Ajax, and no, that won't work as written because you're not actually posting the form itself, you're building an array of values which you are then posting...
>>>>>>>>>
>>>>>>>>> What you could try, instead of doing $.post(... as you do below, is actually then do a 'return true' which should then actually submit the form...
>>>>>>>>>
>>>>>>>>> Is there some reason why you want to do this with Ajax, rather than just submitting the form....?
>>>>>>>>>
>>>>>>>>> Cheers
>>>>>>>>> Steve
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> FX.php_List mailing list
>>>>>>>> FX.php_List at mail.iviking.org
>>>>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> FX.php_List mailing list
>>>>>>> FX.php_List at mail.iviking.org
>>>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> FX.php_List mailing list
>>>>> FX.php_List at mail.iviking.org
>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>
>>>> Steve Winter
>>>> +44 777 852 4776
>>>> steve at bluecrocodile.co.nz
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> FX.php_List mailing list
>>>> FX.php_List at mail.iviking.org
>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>> Steve Winter
>> +44 777 852 4776
>> steve at bluecrocodile.co.nz
>>
>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
Steve Winter
+44 777 852 4776
steve at bluecrocodile.co.nz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20110818/f271d233/attachment-0001.html
More information about the FX.php_List
mailing list