Rest API to upload an image with customized metadata in office 365 - php

My requirement is to upload an image with metadata, i used FileRestAPI to upload, i want to upload the image with metadata information like city,zipcode,date,address,customer type.
Does it possible to upload the file content with customized metadata like above?
or
I can upload files only with the predefined metadata information available in Item.properties?
Another question
Does it possible to do a search operation in cloud/server based on above metadata information?
My Environment:
Windows application, PHP,Office 365.

Related

Tinymce imagetools image not showing

so I started using tinymce for my blog posts and there is this problem with imagetools, they work while images are being edited, but after the article is posted, only this BIG url is showing. I think the problem is that, the blob image which is created while editing is not saved and I need to save it, right?
By the way I am using laravel.
When you edit images using the image tools they will always be turned into a Base64 or BLOB encoded image - the image tools function in the browser and know nothing (directly) of the application in use (e.g. Laravel). As such its up to the application to determine what to do with these images:
https://www.tinymce.com/docs/advanced/handle-async-image-uploads/
The basic process is that TinyMCE will create a separate HTTP POST for each image that you modify with the image editor. It will send that image to a URL of your choosing (via HTTP POST) based on the setting of the images_upload_url option in your init.
The image handler at the URL referenced in the images_upload_url (which you have to create) has to do whatever needs to be done to "store" the image in your application. That could mean something like:
Store the item in a folder on your web server
Store the item in a database
Store the item in an asset management system
I would assume Laravel has some APIs such as the Filesystem API that you could use to store the images appropriately.
Regardless of where you choose to store the image your image handler needs to return a single line of JSON telling TinyMCE the new location of the image. As referenced in the TinyMCE documentation this might look like:
{ location : '/uploaded/image/path/image.png' }
TinyMCE will then update the image's src attribute to the value you return. If you use the images_upload_base_path setting in the init that will be prepended to the returned location.
The net here is that TinyMCE knows when an embedded image exists in your content but it can't possibly know what to do with that image in the context of your application so that job (the "image handler") is something you must create.

Joomla 3.0 custom video and image URL upload option

i have a joomla 3.0 component for movies sales (PICSELL) but i want to add an option where i can choose to upload movies using (Custom URL to upload movie and Images) the component already has file manager where to upload movies,images,prices,movie type (zip file or flv) and i want to add an option to it so that ones i put the url it will call both video and image from my server due to uploading problems and internet connection problem by uploading from file manager.while adding the URL option other information should be same in the file manager.so the option button will be shown ontop of the file manager to choose between uploading via file manager or via URL
how do i do that? what code will i use and where to use the code?
You want load videos from upload file or url path
i see the documentation and using multiple site.
Its totally free
General Video : Select when you upload video from your hard disk or
through a direct video file path
I have suggest yendif player

Bigcommerce API product images

I am able to upload products to my Bigcommerce store via the API with no problem, but I want to link those products to images that I have already uploaded via WebDav-the images are currently in the 'upload' folder. How do I do this?
When I upload products via a CSV file, all I do is have a column labeled 'Product Image File', which contains the file name of the image that is residing in the 'upload' folder. When products are created this way, Bigcommerce will automagically link the products with the associated images.
End goal is to use the API for product creation, and tell Bigcommerce which image file to use that has been uploaded via WebDav, in advance.
The main thing to note in regards to adding images via API is that it must be done in a separate request from the creation of the product, unlike when importing by CSV. Your script should first create the product and capture the ID of the newly created product from the response BC gives you. Once you have that ID you can add an image by following the "create a product image" POST method described on this page:
https://developer.bigcommerce.com/api/stores/v2/products/images
You can only add one image per POST request.
The full path to the image (including http://) will be added to the image_file parameter of the object you pass in your POST request body. This is the only parameter that must be passed when creating an image but there are other things you can pass along as well if you choose.
If the images that you have uploaded to the Webdav server of your store are placed into the /product_images/import/ folder then you can reference the image in the image_file parameter by just the name of the image with it's extension (ie: image_name.jpg) just like in a CSV import. You stated that you uploaded your images to an 'upload' folder though, if that is the case you must use the full HTTP path to the image.
The image file path has to be relative to the 'import' directory:
https://developer.bigcommerce.com/api/objects/v2/product_image
When specifying a product image, the image_file should be specified as
either: A path to an image already uploaded in the import directory
and the path should be relative from the import directory or a URL to
an image accessible on the internet.
the same problem I was facing, i was trying to upload an image in a product using V3 API, but show errors 422 "image URL must be preset if uploading image by URL", my image is present in WEBDEV server,
file path: /dav/product_images/import/abc.jpeg
I was trying to upload an image URL with API Body
{
"description": "Top View upload",
"image_url": "https://store-xxxxxxxxxxxx.mybigcommerce.com/dev/product_images/import/abc.jpeg",
"is_thumbnail": true,
"sort_order": 1
}
it was showing error,
so I download Cyberduck to connecting to my WebDAV server, I create a connection
https://support.bigcommerce.com/s/article/File-Access-WebDAV
after connecting my store server with Cyberduck, I open folder "product_images/import/abc.jpeg"
then right-click on and click on "Open URL" copy URL and paste it in API image_url value
Issue: please use the following URL structure if upload image URL from Webdev :
https://store-url/product_images/import/image_name.jpg
Eg. https://store-abcdefghijk.mybigcommerce.com/product_images/import/abcd.jpg
i was using the wrong path i.e.
https://store-abcdefghijk.mybigcommerce.com/dev/product_images/import/abcd.jpg
if you are using dev in the image URL please remove it

FineUploader: Possible to upload to different locations based on file type?

Happy Friday!
I was curious if the following was possible:
I'd like to be able to upload media to different locations based on its file type. I really appreciate that Fine Uploader can upload directly to Amazon S3, but I don't want everything to go straight to S3. I'm using WordPress and need to generate different image sizes for uploaded media, so I'd like to upload images to my server for processing and then over to S3 ( via this plugin ). Any other media ( audio, video, etc ) I'd like to upload to S3. What do you think? Is this possible?
Are you ok have two separate Fine Uploader instances? This is what would be required. Essentially, you would have to setup a button tied to a traditional endpoint Fine Uploader, and another tied to a Fine Uploader S3 instance. The buttons could have specific validation restrictions tied to them to prevent users from accidentally submitting an image file to the S3 uploader.
Another option is to provide your own file input element, check the submitted files, and then pass the appropriate file(s) to the appropriate Fine Uploader instance via Fine Uploader's API (addBlobs or addFiles).
Another possibility: just allow your users to upload all files to S3, and pull the each image file back down to your server (temporarily) after they have reached the bucket, modify it, and send it back to S3.
Note that I am working on a feature for Fine Uploader 4.4 that will allow you to specify images sizes via options, and Fine Uploader will scale the images and send each scaled image separately to whatever endpoint you choose. See issue #1061 for details/progress updates.

Upload Plugin Cakephp

I'm new in CakePHP and trying to learn but I don't understand this part very well..
I'm using this CakePHP Upload plugin to upload images for users(avatars) and using imagick it resize image to certain sizes(thumbs)...
I follow Upload plugin instructions for uploading image. I manage to store image file and image directory in database. So column photo in database would be (imagename.jpg) and photo directory would be userid,
for example (35). Image also appear in files/user/userid/imagename.jpg
Now may be it's funny but how I output this image and display in view file ? Also is there possibility to randomize file name ? (so the file name is not same as uploaded)
to view your upload in view files of CakePHP
you write in ctp files like
$html->link($html->image('files/user/".$userId."/".$ImageName."', array('alt'=>"User Image", 'border'=>"0"))
,'#',array('id'=>$userId, 'escape'=>false));
let me know if i can help you further,

Categories