Hi,

I have a flexinode that is image based. When a user uploads an image I want to hook into the upload method and capture certain information first and depending on that info change the destination location for the image.

Anyone have any suitable ideas for hooking into this?

Thanks
Bernard

Comments

Bèr Kessels’s picture

If I get it right, you want to use upload.module's APIs for a file upload field in flexinode?
My advice is: don't. upload.module is fine for what it does (uploading files with nodes) but crap for anything else. It is not modular, its apis are nothing more then internal functions and so on.

I would adice you to use filesystem for a flexinode field. filesystem is a very good API

---
Professional | Personal
| Sympal: Development and Hosting

bernardwright’s picture

Thanks, i will take a look at that module. Basically what I want to do is change the destination of the image which is uploaded so that instead of going into /files i can decide if it should be in /files/a or /files/b directory or something like that.

Was hoping to find a very simple way to do that.

Bernard

Bèr Kessels’s picture

A quick hack is the quickest. ut the filapi i linked to has all that, and more :)

---
Professional | Personal
| Sympal: Development and Hosting

bernardwright’s picture

Hi, I have downloaded and placed in the modules folder, but it is missing fileapi.inc, I've had a look around but can't find it, I must be going crazy.

Bernard

bernardwright’s picture

Hi, I have downloaded and placed in the modules folder, but it is missing fileapi.inc, I've had a look around but can't find it, I must be going crazy.

Bernard