Processing uploads to other table

5 posts by 2 authors in: Forums > CMS Builder
Last Post: August 1, 2012   (RSS)

Hello all,

I am using the mail download plugin for the cms.
I want to create a page which processes the data from the incoming mail section to another section, including the attachments.
What is the easiest way to do this?
I came across something with @saveUploadFromFilepath, but i don't know how it works.

Thanks in advance!

Re: [Jason] Processing uploads to other table

Hello Jason,

Thanks for the quick response.
But after this is done, will it delete the upload from the section it came from?
And if not, if i delete it at any of the two section, will it also be deleted from the other?

Thanks for the help,
Guido

Re: [GuidovTricht] Processing uploads to other table

By Jason - August 1, 2012

Hi Guido,

The saveUploadFromFilePath() function will make a copy of the upload and associate it with your new record. You will then need to delete the upload from the other section. you can do this using the removeUploads() function. This works by passing a WHERE clause to the function.

For example:

removeUploads("num = '".intval($upload['num'])."'");

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Processing uploads to other table

Hi Jason,

That's all the info i need right now. Thanks for the quick help! :)

Guido