How to get access to image data through browser object in powershell? - powershell

I'm trying to automate website testing using powershell. I need to compare one of the images in tag with a file on my hard drive.
Is there a way to access the file without downloading the file the second time?
.. if it's not..
Is there a way to force the browser object (ie9) to get the site without images (without changing it in the settings of the browser) and then download the images individually?

Related

Load PDFs from local file share

I'm developing a web app for in-house use and I'm looking for a better way to display PDFs.
I've played around with Adobe's 'Work with Local File' example from GitHub, Adobe GitHub Example, and it works great using the file picker to display a PDF. Is it possible with Adobe's PDF Embed API to take a file located on a local file share and display the PDF?
I'm thinking I need to create a file promise but I'm not sure how to create that.
Unless you can make a network request to load the PDF, the answer is no. Browsers generally can't read from local files unless a user action actually picks the file. If your local share can be made accessible via HTTP, then you would be good to go.

In TinyMCE is there a feature to allow pasting images when using the backend image load handler which saves uploaded images on the server?

I'm using the image upload script with a backend URL to rename uploaded images stored on the server. It seems to work well with both file uploads and also drag-and-drop.
Without that backend handling you can paste images directly into the editor, but they get saved as base64 with the post in the db itself which is not great for a lot of reasons.
If I use the image upload script as I am now, it seems it blocks the pasting of images directly into the editor. That's safest, I guess, but I was wondering if there was a way of allowing it, but treating the pasted image like a drag-and-drop image, for example, so we could have the convenience of pasting images but still have them saved with unique filenames on the server instead of being embedded as base64 with the rest of the source of the post?
Thanks.

Whats the best approach to view a file in flutter which is not defined by type

I am in a situation where I need to store a document which can be of any type like. pdf, Docx, excel or an image. now I don't have the option to force only one type.
The issue is what to do for an app to work for ios/android as same. should I ask the user to upload the file and store it on the server and ask them to download every time they need it? or upload a copy to server and store it locally where they can access it.
if later is the way to go as a user might need to access the document offline. so what to do for this?
any plugin to use for the same.

With filepicker.io, is there a way to get the original file path?

I am using filepicker.io and specially computer as main service.
I would like to get the original file path of a file uploaded through the API.
For example, if I upload a file located at /my/path/in/my/computer/file.zip, I will get in the FPFile object the filepicker.io URL but not the original file path.
Is there a way to get it ?
PS: I have tried to retrieve the stat of the file too without success.
Due to browser security limitations, the real local path of the file is never exposed to the javascript application. For more information, see http://davidwalsh.name/fakepath

Zend display image

Hi i'm using zend framework and what i want is to show an image.
My image is in a folder /uploads/photo/default.jpg.
If i move the folder to /public/... everithing works fine but I would prefere to leave there if i can because all images are profile's image so i don't want to leave them in public...
My code to show the image is
<img id="image" src=<?php echo $this->baseUrl().'/uploads/foto/default.jpg'; ?> >
And I know that it don't work but there are a way to leave my folder there changing my code?
The images need to be publicly accessible so a browser can view them. If you don't want to physically store them in the public folder you either need to make them accessible from there (by creating a symlink from public/uploads to your uploads folder), or serve them via. a PHP script, which would be able to read the data from wherever the file is located.
Serving binary data via. PHP has its own issues, as it will be slower and you'll need to ensure you send the appropriate headers. But this would allow you to restrict access, e.g. only allowing users to view their friends' profile images, if this is your goal.