Currently trying to allow users to click a button in a react application to open a .docx document in their local version of word.
Have a C# rest endpoint setup that will return a document as a FileStreamResult if you pass it a document id.
Wondering if anyone has accomplished this before as I was eventually hoping that i could pass an endpoint in to the save parameter so once saved it would upload back to the server.
Tried running the ms-word command however it comes up with "this action couldn't be performed because office doesn't recognize the command it was given". ms-word:ofe|u|<>
Thanks in advance.
I have a zipped file containing images which I am sending as response to a python REST API call. I want to create a rest application which consumes the python rest api in this manner: The response's content should be extracted without downloading (in browser side) and all the images should be displayed to the user. Is this possible? If yes, could you please help me in the implementation? I am unable to find help anywhere.
I think what you are trying to do is have a backend server (python) where zip files of images are hosted. You need to create an application (that could be in react) that
Send HTTP calls to the server get those .zip files.
Unzip them. How to unzip file on javascript
Display the images to the user. https://medium.com/better-programming/how-to-display-images-in-react-dfe22a66d5e7
I'm not sure what utf-8 has to do with this, but this is possible. A quick google gave me the results above.
I am trying to upload Image/Video files into S3 bucket from my React JS application. So I refered some of the React S3 uploader npm packages react-dropzone-s3-uploader , react-s3-uploader-multipart. But both are keep giving Errors while importing into React JS component. And I have already post this error message on my another stack question (please refer this qus). I would like to do this multipart upload directly from my React application to S3 bucket. If anyone knows the solution please share with me.
Thanks in advance.
The only lib which worked perfectly and supported AWS S3 multipart with minimum work was Uppy for me. Highly recommended to try out:
https://uppy.io/docs/aws-s3-multipart/
you will need to provide couple endpoints for it though, so read the docs. You will see "Companion" mentioned there, you can easily ignore it, provide 5 needed endpoints of your custom API and it will be all good. I would suggest to run the UI part, puth in some dummy URLs for these 5 functions and check network activity of the browser to faster understand how it works.
A function that calls the S3 Multipart API to create a new upload
A function that calls the S3 Multipart API to list the parts of a file that have already been uploaded
A function that generates a batch of signed URLs for the specified part numbers
A function that calls the S3 Multipart API to abort a Multipart upload, and removes all parts that have been uploaded so far
A function that calls the S3 Multipart API to complete a Multipart upload, combining all parts into a single object in the S3 bucket
Yet no matter what way you would build multipart upload, you will always need to start the upload, list parts, get signed URLs to upload each part, cancel the upload & complete. So it will never be 3 minutes task to build this, but with Uppy i had most of success.
You can use React Dropzone Uploader, which gives you file previews (including image thumbnails) out of the box, and also handles uploads for you.
Uploads have progress indicators, and they can be cancelled or restarted. The UI is fully customizable.
Here's an example of how to upload files directly to an S3 bucket, using pre-signed URLs.
Full disclosure: I wrote this library.
Here’s a way to do it full stack MERN with express file upload. Server code here is minimal. This might be helpful, if not, no worries!
https://link.medium.com/U1SdsoHMy2
I've been looking at the Bulk 2.0 API for SalesForce for uploading data. All the examples say that in the request body I need to provide the contents of the CSV file. Below is from official salesforce docs:
Request Body:
(Content of your CSV file)
I'd like to know if there is a way to just provide a link/path to the file?
The BulkConnection class provides several methods that provide the ability to pass the batch as a stream, notably createBatchFromStream.
My program picks up mail from a PoP3 enabled email exchange server.
This mails have screen shots as part of the body.
I want to save the screenshots in the mail on the local drive.
I am using JavaMail API.
The API doesnot pick up the screenshot as an inline attachment but rather says the mime type of the email message is text/html.
How do I pick up this screenshot using javamail.
All I get is a src:cid
If it's referencing the screenshots using src:cid, the text/html will be one part of a multipart/related and the screenshots will be other parts. You can match up the cid reference with the Content-ID of the parts.