For a shopping site, I need to add product via file upload.
I have returned the data entered from csv as array. But now I need the images too. But in Csv only the image names will be given.
I need the image content in db. My images are stored as long blob data.
How can I get the image content?
Related
I want to bring up a website that is a cosmetics project. and I want to create product info for them each product has an image that I make a URL for them and I want to use an ejs for them. ex: for a product for its image I want to write <%= product.img %> and the product image will show up and I don't know how to put a URL in the MongoDB database to when I type the ejs in .ejs file it will show up the image of the product. I search a lot in google all of them was for that user to upload an image on the website but I want to upload an image in my database and then use it with ejs file.
just store the image url in the database and then put that url in img tag src attribute. then it should show the image
You can convert images to base64 format then save them on your database.
Refer to the code below:
const fs = require('fs');
const contents = fs.readFileSync('/path/to/file.jpg', {encoding: 'base64'});
Hello I have a question about uploading images to WinCC Unified V17 from my external db. The database contains the file path of the images. According to the following product, a specific image need to be chosen from the database and will be shown on the screen.
How can I dynamically call a file path from the database and show it as an image on my screen while the WinCC is running ?
Thanks in advance for your responses.
I have used cloudinary. I have uploaded an image to cloudinary and I want to get that image status from cloudinary that it is uploaded or not using cloudinary URL or from image name.
I am using jQuery and I want to display a list of images with their status uploaded on cloudinary. I have URL stored in my database.
Can anyone have an idea on this?
You can utilize the upload response (JSON) for this matter, as described here.
I am using REST client to upload a profile photo to IBM connections but i am struck at the part where you have to send binary image file along with the PUT request. So far I've done this:-
request.put("https://servername.com"/profiles/photo.do?
key="profileuserID"),
ContentType:image/jpeg
i have tried to put insert image by encoding it into base64 format or adding into file field in REST client. But it always returns nothing. It does remove the previous profile picture but it doesnt upload the new one.
Now i want to ask how to include binary image file in the request payload?
I have an image in the form of a base64 string (extracted from a canvas).
I want to upload it to the server as an image file - as if the user had selected the image from their drive.
I don't want to post it as a string and convert it on the server unless I have to. (I'd have to write a new process for it; I already have one for handling a file upload.)
Is this possible?