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

swfupload, jquery, sessions and a php upload script

Development and Programming

vinci's avatar
vinci
85 posts
17 years ago
vinci's avatar vinci

Hi everyone. Im developing a very cool product catalog and ecommerce module called ‘catablog’. Its coming along very nicely.

Now, the thing I need some direction on is image uploading for the products and categories. Im using swfupload as it suits the requirements very well, and has a very nice interface.

Swfupload uses jquery to initialize each instance of the upload form. It also uses a separate upload.php file to do the actual uploading and thumbnail generation side. So the problem is, I have to provide all the database connection settings in the upload.php file as the script also enters the image filename into the database. This means asking people to hack the upload.php file themselves, which isnt a nice thing to have to do or a module.

It would be nice if I could keep the upload file inside the mcp.module.php file, but swfupload doesnt like that as it will read the whole file, class and methods and all - something to do with ignoring cookies I believe. It gets directed to the cp login page, not the ‘&P=upload’ switch function. which leads me to believe its a session/cookie problem. Having a separate file also means that I have to start my own session with upload.php, which I dont want to do either.

Anyone have any suggestions or clues?

maybe it could point to the upload.php file, and when the upload is completed the upload.php file redirects to a specific method in the module class, with $_get to describe the variables to enter into the database. But thats getting a little beyond me…

       

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.