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.
Related
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?
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 am creating an Image manipulation tool in the browser, and I want people to be able to select an Image folder to use as a directory to work from, and I would like those images to be available for editing and displaying in a HTML canvas.
How can I have the user select a folder on their computer and load all the images from inside it?
What about handling Dropbox, Box, Google drive as well as File, Folder and Drag & Drop. If you are interested take a look to this: http://extract.autodesk.io/ - This sample does not work with images, but 2d/3d models, but it is not different than images, change change the file filters accordingly.
Source code is posted here: https://github.com/cyrillef/extract-view.and.data.api
Where to start:
Install Flow.js - https://github.com/flowjs/flow.js
https://github.com/cyrillef/extract-view.and.data.api/blob/master/www/index.html#L195 for the HTML portion
https://github.com/cyrillef/extract-view.and.data.api/tree/master/www/js
upload-flow.js - using the flow.js library for local file
loaders.js - to handle dropbox, box, google driver, etc...
https://github.com/cyrillef/extract-view.and.data.api/tree/master/server
flow-node.js - the Flow.js Node.js implementation
file.js - the server routing for Flow file
You also got it in PHP, if you do not want Node.js
https://github.com/cyrillef/extract-php-view.and.data.api
I`m trying to add pictures to reviews on opencart products.
I use jquery.form.js (from here)
I get the name of the file(C:fakepath/Image.png),but I cant proceed from there.I cant figure our there exactly is this file located on the server.
Any help will be appreciated!
C:fakepath/Image.png is the path generated by browsing on windows when you are uploading the image with a input type file. You need to post the image on the server to get your image server path.
I am building a Discussion Forum as part of a bigger application I am building, the forum is just 1 section of the Application.
For my TextArea fields when posting a new Topic or a Post Reply, I have decided that nothing is as good as the PageDown Markdown Library. It is the same one that StackOverflow uses on all their sites and it works better than many of it's competitors.
The way the library ships though, I am not happy with the default Insert Image functionality. You hit the button to insert an image and it allows you to enter a URL for an Image and then it inserts the proper MarkDown syntax to show the linked image.
This just won't cut it. I need the functionality that you see on StackOverflow! Very similar anyways.
I need it to show a Dialog when you click the Insert Image button, like it does now, but instead of just an input field for a Image URL, it will have 2 filed options...
Upload image from your computer
Insert an Image URL and it will then DOWNLOAD the image from that URL and insert it into the post just as if you had uploaded it from your computer. This is important to not confuse this step. IT should not simply insert the Image linking it to the original Image URL. Instead it will take that URL and download/upload the Image to the same server that the upload from computer option does and then it will insert the NEW Image URL pointing to the newly uploaded image!
Based on some simple HTML like below for a Dialog window with a filed for my Upload from Computer functionality, which I already have working. I need to come up with some JavaScript and PHP that will download/save a remote image to my upload folder on my server when a button is clicked using only the URL that will be inside the URL text input field.
So it will need to do a few things...
Fetch and save an image file to my uploads folder using PHP when the only thing that the PHP function will receive is a URL of the image which could be on the same server or most likely a remote server.
After successfully saving/uploading an image from the URL, the PHP function will return a JSON string with the status/error and if successful then it will also return the actual URL and filename of where the new image is saved on the local server. The JavaScript/AJAX script will receive this JSON response and insert the Markdown syntax for the image into the PageDown editor.
The PHP function will need to ensure that the URL that it is trying to save/download is a valid image file and not some malicious file! Also not simply just some file of the wrong filetype like a non-image file unless we are allowing the file type.
It will be part of a module installed on many dinosaur servers so it needs to work on as many servers as possible too!
From the web
From your computer
I would be greatful of any help, tips, code snippets or anything to help with this. At this stage I really just need to build a nie PHP function that will upload images from a remote URL and also ensure that the URL passed in is a real image file or even better that it is in the allowed file types array!
A couple years ago I had started this but have now lost it and I am starting over and don't remeber much about how I went about doing it then.
The easiest way to download a file from a remote server would be to use copy (http://php.net/manual/en/function.copy.php):
copy('http://someurl.com/image.png', '/var/www/uploads/image.png');
As this function returns a bool, it is easy to determine whether the operation was successful and create a JSON response.
To verify that the file is an actual image, there is unfortunately no way that is 100% sure. It is probably enough to check the mimetype though. You can use finfo for that (http://php.net/manual/en/function.finfo-file.php):
$finfo = finfo_open(FILEINFO_MIME_TYPE);
echo finfo_file($finfo, $filename);
finfo_close($finfo);
For a gif, this would return image/gif for example. You will have to hardcode a list of all mimetypes you want to allow.