Saving media file without adding media item to database
I would like to store a lot of media files, but i dont want to create ids and stuff in the database, only save the file in the media directory, and get the path file, same as the upload property type does.
Although i could do it manually, I would like to use the api to do this because of:
Using the api i dont have to create a new folder with a name (having to look if that folder name exists, etc).
Take advantage of the Azure package that saves media in Azure when using the api instead that in local media directory.
I have tried out that if i create a new IMedia item, and set the file value, the file is saved in media folder in Azure, but i cant get the umbracoFile path until i save the IMedia in the database. Is there a way to get the path of the saved file without adding the media to the database?
Saving media file without adding media item to database
I would like to store a lot of media files, but i dont want to create ids and stuff in the database, only save the file in the media directory, and get the path file, same as the upload property type does.
Although i could do it manually, I would like to use the api to do this because of:
I have tried out that if i create a new IMedia item, and set the file value, the file is saved in media folder in Azure, but i cant get the umbracoFile path until i save the IMedia in the database. Is there a way to get the path of the saved file without adding the media to the database?
is working on a reply...