Am I able to add a video to a data table in my local db. And if so what would be the data type. I am using a file upload controller to upload the videos and I have 3 fields the title, category & description. Is that the best practice or is there some other/better way of doing it?
Any help appreciated
Thanks
Why you want to save whole of your file into database?
You can only save the path of uploaded video to your database and fetch from the path when needed.
Related
I am trying to make an application in Windows Form Application in C#. In my project I have added solr. I will upload files (json, xml, csv, txt, or database) and I will do the searching. I can do the filtering or searching by using solr in C#. However, the problem is I can't submit or upload the files to the system. For instance, I want to upload a database to the system. I have already done the query part so that I will do the filtering and searching. But as I said I can't do the file upload part.
I am doing my interface in C# so that I will not use the solr interface. Thats why, I need to submit/upload choosen file when button pressed.
Is there any way to do that?
Do you have any suggestion for me?
why don't you try uploading file to server & instead of saving file to the database!
while uploading a file, convert it into zip & then save it to the server folder, & save path of the file in the table.
Good Day. So I have a question about storing images in Mysql.
My professor told us to change the data type of our column from blob to text.
And told us to store our images in a folder and not in the database itself and
just create a link stored in the column with the data type of text to link it to the directory of the images I want to show up in the db.
I don't know how to do it. I don't know how to use PHP.
My group is coding in C#.
Thank you!
Assume you are saving images in a directory /your_project/images/image_name.png
Then just save the relative path in your database like 'images/image_name.png'.
And when you need to fetch that image then just get this value and prep-and it with your main directory_name like www.site_name.com/images/image_name.png
You can change your main path when you move server .
I have an Asp.Net using C# Application in which I have Saved the Bar Code Image in DB in Blob format and fetched that in Crystal Report and it is working fine till now.
But According to our DBA it is eating up lots of DB space so they have informed me to change the Application.
So Now instead of Saving the Image in DB I have to Save the Image in a Folder and then Call it in the Crystal Report Dynamically, as I will be saving the path of image in DB.
Have Searched Google But Didn't get any solution.
Please if you have any solution or Example please Help me to Solve this issue.
Thanks a Lot in Advance...
Got Solution to my Problem:
Pls Refer : http://csharpdotnetfreak.blogspot.com/2012/06/crystal-reports-display-images-database.html if anyone need the Solution.
I am trying to store references of images in a SQL Server DB and store the actual images in a file server/folder. I am hoping someone could give me a link or code example on how to do this. I don't want to store BLOB in the database.
I am using ASP.NET/C# to handle this.
All files in a folder have unique names, so I think you shouldn't worry about storing the path of the image, as suggested in the comments. If you are worried about consistence, i.e. someone deleting a "referenced" image or inserting a path to nonexistent image file, you could check that either from your application, or even from the database itself.
However I would not hesitate to use a blob, you can use MS SQL 2012 and insert the image files to a file table, which sounds quite convenient.
as per my knowledge.or my expirence the images are stored in sql server that is in image datatype feild.it is stored in byte format.that is actlly the reference of the actual image.hope this link help you to get more clear idea about it
http://www.sqlhub.com/2009/03/image-store-in-sql-server-2005-database.html
http://www.codeproject.com/Articles/10861/Storing-and-Retrieving-Images-from-SQL-Server-usin
Use a HttpHandler to grab the image from the database and use the Image data type:
Retrieve image of image control as byte array which is set using generichandler(.ashx)?
Storing images in your dataase or in a filestream, totaly depends on your images size. In Microsoft Research there is a good paper called To BLOB or Not To BLOB.
After a lot of test and much analysis;
If your pictures are below 256K, store them in datebase VARBINARY column is good.
If your pictures are over 1 MB, storing them in the filesystem is good.(With FILESTREAM attribute, they are still under transactional control and part of the your database)
I'm trying to build up a very simple database where i should have an entity composed by an image and a word associated with that.
I'm using SQLite with C# and since this would be an application which will evenutally be deployed I'd like to know if there's a best way to save an image in the database..
I saw a lot of techniques using stream of bytes, so my question is:
is better to save the stream of bytes in the field of the entity or is better to just save the path of the application where the image should be store?.. And why the chosen method should be better?..
thank
It is better to save path in database and image(or other files) on hdd
Storing Images in DB - Yea or Nay?