Save Image from URL (on Mac)

I’ve been using the File Uploader and pasting in the URL for external images which works fine on Windows, but on a Mac there is no field to paste into. I’ve tried using a text field and then doing the upload from there, but I get an invalid path error. This is crucial functionality for me. Any thoughts on how I can achieve this?

Hi Heather,

Can you post some screenshots showing your issue? It’s a little confusing.

For the image upload you should have:

  1. File Upload (upload1) - upload field = {{$_Post.your_upload_field}} - Path = Your folder (eg. /images)
    Note make sure in globals your input is set to file.
    I always make sure the following are ticked
    Replace Spaces
    Replace Diacritics/Accent
    Strip All Non ASCII

If you want to add image resize then
2. Load Image - Image Path = {{upload1.path}}
3. Resize Image - Image = image1 Width= your choice eg.300px Height - your choice eg.300px
4. Save Image - Image = image1 Path the same as step 1(eg. /images)

Make sure the following is ticked
Create Path

This should work for you. Hopefully

1 Like

This is the issue. Windows has a field where you can paste a URL, Mac doesn’t.

Well the file inputs expect you to actually browse to your file and select it, not to paste URLs there …

Yes - I know that, but I need to be able to upload images from URL. This is a workaround that was suggested earlier and works on PC, but not on Mac.

Is there a way to upload from a URL? I tried using a regular text input field and changing the type to file in Globals as Gunnery suggested but that doesn’t seem to work either.

No Heather, but this requirement is weird:

The upload component as well as file inputs expect a local file to be selected, as i explained earlier.

I usually paste in paths in file dialogs in Windows - I rarely browse for files or folders. I find using file dialogs on the Mac - or Finder in general - frustrating. However, you can drag/drop files or folders onto these dialogs.

It’s probably not a feasible solution but you could drag an image from a webpage onto your desktop and then drag it onto the file dialog - to avoid any typing or browsing for files.

1 Like

With the explosion of API use, and hence Wappler’s decision to add API usability in its product, it seems like folks trying to save images from a URL would be something more people might need to do. Maybe we could look at a component that would do that or the developers could look at adding that ability natively somehow? :pray:

1 Like

Thanks Tom. I’ll have to borrow a Mac to see what I can figure out. They might just have to save the images locally and then upload them. Not the end of the world, but one extra step in the process which it would be nice to figure out how to avoid.