I have been trying to implement media import in the Vanilla forums. But after many tries i'm still stuck.
In the text (csv) file from the Vanilla Porter, we get a table called "Media"
which has the following values stored:
MediaID:int,
Name:varchar(255),
Type:varchar(128),
Size:int,
ImageWidth:int,
ImageHeight:int,
StorageMethod:varchar(24),
Path:varchar(255),
InsertUserID:int,
DateInserted:datetime,
ForeignID:int,
ForeignTable:varchar(24)
Now in my tries,
I defined a new method "def import_media" and i also made sure that it was being executed.
However, i have tried every possible way and the media import is just not working.
Heres an example of the data in the media table:
“118",
“SAM_0350.JPG",
“image/jpeg",
“3438485",
\N,
\N,
“local",
“FileUpload/scratch/fr.jpg",
“296",
"2011-03-21 17:40:49”,
\N,
\N
So basically the only thing i cant get right is the code to go in this part:
def import_media
puts "", "importing media files..."
end
I have tried varieties of different commands to no luck :/
If anyones is feeling up to the challenge or want to contribute please do help me.
@zogstrip Also said that he would be happy to merge any pull request.
I can provide him the dump file too.