Saving profile picture of users in php [closed] - php

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I have created a app in php. How i can save the profile pictures of the users? Will that be a good idea to save them in db using base64 encode.

upload them on the server and save the path on the database

Store images in your server and store the path to images in the database. This will reduce extra overload on database server.

Related

Storing a file into a database & uploading it in a webpage [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Background
I'm creating a website where the user can store an article as a file in the database and than upload the file's content into a page in the website using a form. The file may only contain text or image or both.
Question
Can anyone walk me through this?
I would suggest you to create a database table having fields having the userId, and path of the file.
The file uploaded should be saved in the Web Server, and its path need to be saved in the database.
The vice-versa should be done while retrieving the file content.

what is the best way to save videos in a sql server? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
what is the best way to save videos in a sql server ?
i want to make a web app to save videos to the server and then retrive it back when needed
No matter which programming language you should follow :
Store video on File server
Store its path in Database while saving/editing/fetching.
You should not save the video file itself to a SQL server. Save the files to server or cloud storage and save only information related to the video in a SQL server such as title, size, uniqueID, etc.

BarsCode Int25 into image in php [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Hello I have to create a function which generates a barCode INT25 in php. Any ideas how to do it. The function should generate the image and give back the url where to find it.
Thank you very much
There are many examples, and libraries/classes, that can assist in this. Most of these, when you create the image, you save it instead of discarding. Then you can also post the url, or save it in a database for later use. Some examples are as follows:
http://bmpradeep.wordpress.com/2013/01/29/generating-barcode-using-php/
http://www.barcodephp.com/en/manual/i25
http://barcode-coder.com/en/barcode-php-class-203.html
http://www.phpkode.com/source/s/barcode-generator/barcode-generator/class/i25.barcode.php
Save file using php
http://php.net/manual/en/function.imagepng.php
http://php.net/manual/en/function.imagejpeg.php
http://php.net/manual/en/function.imagegif.php

Datatype to use for videos in mysql [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
The Video size can be in GB's. I am using Longblob but max size that it is allowing is only 2MB.
I would recommend storing the video-files in a directory instead of a database, then refer them in the database.
Storing files in the database is usually not recommended. Especially not large files.

How internet behemoths like facebook handle the delivery of the photo content? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
As they have lots of traffic I am wondering how they handle (or you can make an assumption on how they do this) delivery (loads and uploads) of their main asset - photos?
Are they keeping everything in the database? Do they encode with something like "Base64 Decode and Encode" and keep the content in the database? Or maybe they just somehow storing only the links in the database to the images.
As you can see I am having a hard time presuming so maybe you will be able to help me.

Categories