Batch Upload Image Tutorial


* This tutorial is for ih5 version 3.0, as 4.0 already supports multi-graph support ......

===== cut cut =====

Preface: 3.0 database (hereinafter referred to as: database) does not support multiple image uploads, but supports the import of Excel files, which gives the feasibility of the solution, in other words, the image link into Excel, and then import the database can be ...... This turns the problem of multiple image uploads into how to get a link to the image ......

Solution 1.

Just bulk upload the images to your own server and get the link!

Pros: customizable names, overwriting images doesn't change links, workable ......

Cons: Not everyone's own server!

Solution 2.

Get the link through ih5's own database!

Pros: simple and easy to use ......

Cons: You can't customize the name, and you need to re-upload the image to change it!

===== Several attempts to get links to images via ih5 itself =====

The first two fail, so you can look directly at the third

Try 1 (drag the image directly into the stage to get it)

step1: Prepare a few test images and drag them into the stage of ih5 ......

step2: Click on preview and open developer mode to view the image link

You can see that some of the images dragged in directly are not in Url format, but are base64 data ......

consequently

……

Try 1 fiasco!

Attempt 2 (uploading to the database via a recurring event)

step1: Add a container on the stage to put the dragged-in images, then add a database and an upload button ......

step2: Add a recurring event on the upload button ......

object selection cycle

Object Range:The container where the image is placed

Type:

Action:URL of the database to submit the image

step3: preview after clicking the upload button, go back to the database to view, it seems to be possible oh... But ......

Extreme Testing ......

Fruity ......

A warning pops up when there are too many batch uploads...

And the order is messed up ......

consequently

……

Attempt 2 failed!

Attempt 3 (add array transition, submit multiple pieces of data)

step1: add a two-dimensional array to the original, and a counter (to record the number of loops)

step2: Add a loop event to the stage initialization ......

object selection cycle

Object Range:The container where the image is placed

Type:

Action:array filled with rows, the number of rows is the value of the counter, the value is the URL of the image

step3: preview to see that the number of images has been read correctly (i.e. the number of cycles)

step4: Open the database to check and find that only one image was successfully submitted ......

===== don't know if it's a bug bug description =====

After several tests the event logic was found to be fine

And this is a random event. It doesn't always happen.

If you test OK then go straight to step5

If the same problem occurs then go on to ......

step4-1: Add a button and counter, and set the array row to 100 ......

step4-2: button add event ......

Click to output the number of rows of the array to the counter (the value of the theoretical result counter should be 100) ......

step4-3: Preview click test and find that the actual output value is actually 0 ......

Embry-Riddle ......

cure

step4-4: first import some data in the array and preview click ......

(the value shown is the imported row, not the set 100)

step4-5: Then click on Clear Data in the array... Then preview clicked again and found that it actually worked...

(The number of rows remains set at 100)

Don't ask me why, I'm at a loss too! Cover your face and laugh.jpg

=====/not-knowing-if-it's-a-bug bug note =====

step5: After everything is fine, go back to the database and check ......

The images have been uploaded successfully in bulk and in relatively normal order (testing so far yes)

Then export the data linked to these images to Excel ......

Then just prefix the link with the formula

(No need to add a prefix if it already exists)

3.0 with a file prefix of ''

Attempt 3 was successful!

Follow up.

Extreme test, tested the number of batch uploads, visually there seems to be no limit ......

The number is determined by the row value of the array ......

=====END=====


Recommended>>
1、Trucks please line up to drive in the 5G era
2、Ubers flying car to test maximum speed of 320kmh in 2020
3、The first thing you need to do is to get a good idea of what you want to do
4、Latest divorce stats Jilin is 7th Men and women like this are most likely to cheat on each other
5、Taiwans first airline to accept bitcoin payments and use it to spark local tourism

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号