Upload img to 3rd party and get URL - javascript

I'm working on a resume site that allows you to link a URL, but not upload it. I don't really want to have to pay for storing images on my server for a resume project, so I was hoping to create a button or link that does this...
Upload an image to a 3rd party website/server, such as imgur
Get a link from the upload
Automatically insert the link into the form field I currently have for linking to images (I think I know how to do this part)
I'm not stuck on imgur, but it's one of the only sites I know that allows users to upload photos and get URLs easily without creating an account...Anyone have any suggestions? I feel like something like this must have come up before.
PS. I'm trying to advertise myself as an entry-level MEAN stack developer, so I'm trying to keep everything on the website inside of the JavaScript libraries if possible.
Thanks!

very easy to use as temporary hosting:
img2url.site
https://pypi.org/project/Img2UrlApi/
its not a good idea to store images there for longer time,
only as "buffor" to get an url.

Related

Image picker and uploader in Rails

If have done some research but haven't been able to find a good solution to this problem:
I'm building a Shopify app that lets the merchant create a small design to show on the product page, the design includes an image/icon.
I want the user to be able to choose from a list of icons or upload her/his own in the form when creating/editing a design.
How is this best achieved?
I can find out how to make the upload part with active storage. But to have some existing icons for the user to pick out, is where i struggle?
The plan was to use AWS Cloudfront to store these icons, but i still struggle with the functionality of displaying and choosing icons in the form.
Any clues to how i can do this is very appreciated! :_)
you need to pre-populate your table via script (rake task) which uploads these images to your storage like s3 etc. what you can do is write the file names with relative path ( to make your job easy) in a file and read that file to access these images from your rake task and call the same apis to upload one image at a time. Once you have the reference store as a record in the table/model (ex: design) you should iterate over each record on the view to display the preview of each image. From there it’s only a matter of capturing user clicks(to know which image they have selected) or use some js libraries which can do the job. Hope this will give you some direction. Let me know if you need to discuss further.

How to stop a user from copying plain texts from my page and also from downloading any images in my post, nor can he right click onto the page?

Car-renta-system,
these people did it awesome, can i know how to do the same please, using django I'm also building a similar project like this
You can prevent it from being copied by removing read permission from the user that shouldn't be able to copy the file. You can use os.chmod for this, or see this page explaining to set permissions with the full Windows security model.

File Upload/Manipulation/Download without use of a server: Is it possible?

I am looking to make a website that does three things:
The user can upload an image to the website (without a server)
-For this problem, I have found resources like Dropzone, but all seem to mandate sending the image to a server.
The uploaded file is manipulated on the client side
-For this problem, I need the uploaded file to be accessible from my JS/HTML code and I need some way for me to manipulate the file. I currently have my website with the pre-set file embedded in it, which I can then access and manipulate with JS, so the manipulation itself isn't much of the issue, but rather just accessing the file.
The user can then download the manipulated file (again, without a server)
-For this problem, I know that how to make a download button for files that have a web address (which are on a server), but is there a way to have a download button for the file that was just manipulated? I found this question here that seems to be a good starting point, but I am not sure if I completely understand the implementation of it.
Basically, I have the website framework in place (using HTML/CSS, Javascript) and I am just looking to see if this is possible to do without the use of a server, even if I have to use some other libraries. If any insight or links to potentially useful articles/libraries could be given on any one of these three points, I would much appreciate it.
Note: If this is not possible without a server, please let me know because then I will have to completely redesign everything and this whole question is trivial.
The user can upload an image to the website (without a server)
A website is typically hosted on a server. I think you mean the image is uploaded, but not stored anywhere.
The uploaded file is manipulated on the client side
There are lots of cool JS libraries to handle this, for something light you can try out https://fengyuanchen.github.io/cropperjs/
The user can then download the manipulated file (again, without a server)
So if I am understanding you are asking for an image upload -> edit -> image download. This is very possible and common. However, you will need somewhere to cache the uploaded image for the client.
If you are asking if you can upload an image directly to the DOM, you can not. You need to upload the image to the location where your files are being hosted. Imagine having an absolute path to C:/MyComputer/MyImage, it would obviously not work on any other machine than your machine.
If you need some examples on how to handle the upload image to temp location -> edit -> download let me know

Pulling String from Pandora and sending it to Youtube in JavaScript

My project is when Pandora is open and playing, be able to punch a button (either on the page or as an add-on in Firefox. This button would then activate a script that would pull the song and artist name from the page and store them in variables. Then these strings would be put through a Youtube search. The URL of the first video will then be stored in another variable. A website that strips the mp3 from the video will be opened and the Youtube URL will be deposited in the appropriate field. Ideally the converted file will then be downloaded.
I don't know much Javascript but the point of this project is to help me learn. I haven't gotten very far at all and need some help. I know the divs where the song string is on the page but can't seem to store it. I'm using GreaseMonkey to run the script.
One suggestion was to use Java and make it a desktop application and have it listen to system volume and send it to a Shazam-like website and go from there but there are no non-mobile Shazam apps that would apply to this.
What I need help with:
Is JS the right language to use for this task?
If so:
How do I store the song info into variables. I've researched it and anything I put into the script involving a variable causes it to not run.
Thanks in advance.

Is it possible to open an external URL without changing pages -- similar to those javascript image viewer popouts

I'd like to host some images on my website and let people post URL's to them. However, I don't want people to have to be redirected to my website to view them. Is there some way to setup my site so that no matter where the URL is posted, it will open up without changing pages? Similar looking to lightscribe?
If people are simply posting links to your site like <a href="http://example.com">, there's nothing you can do on example.com to prevent them from leaving the referring page.
You could provide a piece of code that will create a lightbox-like effect and encourage your users to use it instead of the URL. Like YouTube, for example, which provides a chunk of HTML that creates an embedded player.
You may try using bookmarklet type links. But you need a bit JS experience for this, though it sure can be done.

Categories

Resources