PDA

View Full Version : Modifying attachment during/after upload


XTF
11-07-2007, 01:11 PM
Hi,

What is the correct location in vB to modify an attachment during/after upload?
I'd like to update some parts of the file.

nexialys
11-07-2007, 01:32 PM
during upload, the files are located in the /tmp directory based on PHP configurations...

you can't actively modify a file that is in the upload process... but you can edit the file itself once it is completely uploaded in the file system... these files are located in the database OR the file system depending on your own settings...

XTF
11-07-2007, 01:48 PM
I've now put my code in vB_Upload_Attachment - process_upload. However, there are no hooks in that function and I'd like to avoid touching PHP files as much as possible. Is there a better location to do this in the vB code?

FractalizeR
11-15-2007, 09:30 PM
I've now put my code in vB_Upload_Attachment - process_upload. However, there are no hooks in that function and I'd like to avoid touching PHP files as much as possible. Is there a better location to do this in the vB code?

Could you please tell me the place you positioned your function to? I am trying to solve the same problem.... Could you answer some questions?


How can you access file contents at that point?
Can you also access file contents of files, uploaded from URL, not from user's PC?
Can you mark file as errorneous after inspecting content so that VB will deny it and present user with an error message of your choice?