I need to updload to my site a huge amount of images. I tried the MultipleFileUpload, but it isn't working and really cant solve the problem.
I dont want to upload 1 by 1, so I thought to do a manual upload via ftp to the server and modify the CMS database. My question is: what tables need to be modified? Is thera documentation of the process?
the image when uploaded via the UI for a media item will be saved under /media/[id of fileUpload datatype]/[filename]. The id of the fileUpload datatype is generated when a new media item with a fileUpload datatype is created, so
Media image = Media.MakeNew(...); has e.g. image.Id = 3289 and image.getProperty("umbracoFile").Id = 34789. If you upload a file 'test.jpg' with the fileUpload it will be stored under /media/34789/test.jpg, also for an image a thumbnail is automatically created.So if you just upload the images to a folder via FTP you would still have to create each Media image manually, which you don't want to do.
What I would do is the following: Create a web servcice in Umbraco that lets you generate a new image media item, pretty much along the line of what Nik Wahlberg has been posted here. Then write a Windows application that loops through all of your images and calls the web service for each image, creating the images automatically one by one on the server. You would probably have to read the image in the forms application and put it in as parameter for the web service as it won't have access to your PC if Umbraco is not running locally.
I just recently created such a forms application that copied images from one Umbraco installation to another one, took me about 1 day to write it and 10 minutes in the end to copy over the 600 images. Might not be the easiest or most straightforward solution but works great. Should you go down that road one piece of advice: when you programmatically create a range of media items make sure you set the umbracoFile property only after you are 100% sure that it is correct and the image is there; Umbraco won't let you delete a media item if the umbracoFile property doesn't point to an actual media item.
If you are using Umbraco 4.5, why not give the desktop media uploader a try? It should just be a case of setting up your folders, then simply dragging and dropping your files into the uploader, whith the uploader doing the rest of the work for you.
What tables need to be changed
Hi,
I need to updload to my site a huge amount of images. I tried the MultipleFileUpload, but it isn't working and really cant solve the problem.
I dont want to upload 1 by 1, so I thought to do a manual upload via ftp to the server and modify the CMS database. My question is: what tables need to be modified? Is thera documentation of the process?
Thanks
Javier
Hi Javier,
the image when uploaded via the UI for a media item will be saved under /media/[id of fileUpload datatype]/[filename]. The id of the fileUpload datatype is generated when a new media item with a fileUpload datatype is created, so
Media image = Media.MakeNew(...); has e.g. image.Id = 3289 and image.getProperty("umbracoFile").Id = 34789. If you upload a file 'test.jpg' with the fileUpload it will be stored under /media/34789/test.jpg, also for an image a thumbnail is automatically created.So if you just upload the images to a folder via FTP you would still have to create each Media image manually, which you don't want to do.
What I would do is the following: Create a web servcice in Umbraco that lets you generate a new image media item, pretty much along the line of what Nik Wahlberg has been posted here. Then write a Windows application that loops through all of your images and calls the web service for each image, creating the images automatically one by one on the server. You would probably have to read the image in the forms application and put it in as parameter for the web service as it won't have access to your PC if Umbraco is not running locally.
I just recently created such a forms application that copied images from one Umbraco installation to another one, took me about 1 day to write it and 10 minutes in the end to copy over the 600 images. Might not be the easiest or most straightforward solution but works great. Should you go down that road one piece of advice: when you programmatically create a range of media items make sure you set the umbracoFile property only after you are 100% sure that it is correct and the image is there; Umbraco won't let you delete a media item if the umbracoFile property doesn't point to an actual media item.
Hope that helps,
Sascha
Hi Javier,
If you are using Umbraco 4.5, why not give the desktop media uploader a try? It should just be a case of setting up your folders, then simply dragging and dropping your files into the uploader, whith the uploader doing the rest of the work for you.
http://our.umbraco.org/projects/website-utilities/desktop-media-uploader
Matt
Thanks for the help :)
is working on a reply...