GameOver Posted September 27, 2011 Share Posted September 27, 2011 Hello, I've made a migration from OSC to Prestashop (latest version). Each product in OSC have a link to a pdf file. I want to import this file into attachment table of prestashop. I'm looking for a mods or a php sample to import that into this table but I don't how to encryt the field named "File" in the Attachment table. Help needed Thanks a lot Link to comment Share on other sites More sharing options...
MrBaseball34 Posted September 27, 2011 Share Posted September 27, 2011 The process is in the postProcess() function in the file /admin/tabs/AdminAttachment.php, and also in the postProcess() function of /admin/tabs/AdminProducts.php. What it does is it takes the name of the attachment, uses sha1() function to create a unique filename from the timestamp and then stores the name in the file column. The real filename is stored in the file-name column.Don't forget to set the mime column to the mime type of the file because that is how the download is correctly handled by the user's browser. The attachment.php file in the root, handles the downloading. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now