IMPOSSIBLE TO IMPORT PHOTOS FROM EXCEL CSV INTO DATABASE COLLECTION WHY ???

Hello

I create a corvid collection database for my website www.kadojet: ‘’ photo ‘’

I want to import this database with the jpeg photos of my base csv excel

the collection takes the text, but not the photos

Why

there are only 6 photos

IT does not take pictures

I have to insert by hand

https://support.wix.com/en/article/about-importing-data-in-the-data-manager

About Field Types

You can import any field type into your database collection, except for the following:

  • Fields that link to dynamic pages.

  • System fields other than the ID field.

  • Document fields, unless they link to documents that already exist in your media manager.

  • Image fields, unless they link to images that already exist in your media manager.

so we have to import the images, 1 by 1?

if you already have the pictures uploaded into your Media Manager, then you can simply add the path for that picture in your excel file and then simply upload that.

https://www.wix.com/corvid/reference/$w.Image.html
https://www.wix.com/corvid/reference/$w.Image.html#src

Set the image to be an image from the Media Manager

$w("#myElement").src = "wix:image://v1/68d3a9_1de7529c444b4c9eb38401f8efe0cad2.jpg/flowers.jpg#originWidth=1970&originHeight=1120";

Set the image to be an image from the web

$w("#myElement").src = "http://placehold.it/250x250";

You don’t have to upload your images one by one either through the Media Manager, you can simply select all the images that you want to upload at one time when you upload any images.

Then sit back and wait for Wix to upload them for you and then they will all be on your site and ready to use, either through using the path in your excel file, or having the pic placed on a page, or having the pic pulled from the dataset into a gallery or a repeater etc.

hello
i have a problem with

https://phili434.wixsite.com/monsite-1

I want to eliminate the duplicates of

region
department
city

I want

when we select a region of dropdown 1, the dropdown “region”, we get the departments of the dropdown 2, the dropdown of “department”.

when we select the dropdown 2 department, the dropdown department, we get the cities of dropdown 3, the dropdown of “city”.

code

import wixData from ‘wix-data’;

$w.onReady( function () {
uniqueDropDown1 ();
});

function uniqueDropDown1 (){
wixData.query(“dataset1”)
.limit(1000)
.find()
.then(results => {
const uniqueTitles = getUniqueTitles(results.items);
$w(“#iRegion”).options = buildOptions(uniqueTitles);
});
function getUniqueTitles(items) {
const titlesOnly = items.map(item => item.region);
return [… new Set(titlesOnly)];
}
function buildOptions(uniqueList) {
return uniqueList.map(curr => {
return {label:curr, value:curr};
});
}
}

export function region_change(event, $w) {
uniqueDropDown2();
$w(“#iDepartement”).enable();
}

function uniqueDropDown2 (){
wixData.query(“dataset1”)
.contains(“region”, $w(“#iRegion”).value)
.limit(1000)
.find()
.then(results => {
const uniqueTitles = getUniqueTitles(results.items);
$w(“#iDepartement”).options = buildOptions(uniqueTitles);
});
function getUniqueTitles(items) {
const titlesOnly = items.map(item => item.departement);
return [… new Set(titlesOnly)];
}
function buildOptions(uniqueList) {
return uniqueList.map(curr => {
return {label:curr, value:curr};
});
}
}

export function departement_change(event, $w) {
uniqueDropDown3();
$w(“#iVille”).enable();
}

function uniqueDropDown3 (){
wixData.query(“dataset1”)
.contains(“departement”, $w(“#iDepartement”).value)
.limit(10000)
.find()
.then(results => {
const uniqueTitles = getUniqueTitles(results.items);
$w(“#iVille”).options = buildOptions(uniqueTitles);
});
function getUniqueTitles(items) {
const titlesOnly = items.map(item => item.ville);
return [… new Set(titlesOnly)];
}
function buildOptions(uniqueList) {
return uniqueList.map(curr => {
return {label:curr, value:curr};
});
}
}

export function iVille_click(event, $w) {
filter($w(‘#iVille’).value);
}
function filter(title) {
$w(‘#dataset1’).setFilter(wixData.filter().contains(‘ville’, title));
}

export function reboot_click(event, $w) {
(‘ville’, $w(‘#iVille’).value = null )
$w(“#iVille”).resetValidityIndication();
(‘departement’, $w(‘#iDepartement’).value = null )
$w(“#iDepartement”).resetValidityIndication();
(‘region’, $w(‘#iRegion’).value = null )
$w(“#iRegion”).resetValidityIndication();
}

$w.onReady( function () {

$w('#reboot').onClick( **function**  () { 

    $w('#dataset1').setFilter(wixData.filter()); 

}) 

})

function text149_click(event) {
$w(‘#dataset1’).setFilter(wixData.filter());
$w(“#iVille”).value = “”
}

can you fix and correct the code?

import wixData from ‘wix-data’;

$w.onReady( function () {
uniqueDropDown1 ();
});

function uniqueDropDown1 (){
wixData.query(“dataset1”)
.limit(1000)
.find()
.then(results => {
const uniqueTitles = getUniqueTitles(results.items);
$w(“#iRegion”).options = buildOptions(uniqueTitles);
});
function getUniqueTitles(items) {
const titlesOnly = items.map(item => item.region);
return [… new Set(titlesOnly)];
}
function buildOptions(uniqueList) {
return uniqueList.map(curr => {
return {label:curr, value:curr};
});
}
}

export function region_change(event, $w) {
uniqueDropDown2();
$w(“#iDepartement”).enable();
}

function uniqueDropDown2 (){
wixData.query(“dataset1”)
.contains(“region”, $w(“#iRegion”).value)
.limit(1000)
.find()
.then(results => {
const uniqueTitles = getUniqueTitles(results.items);
$w(“#iDepartement”).options = buildOptions(uniqueTitles);
});
function getUniqueTitles(items) {
const titlesOnly = items.map(item => item.departement);
return [… new Set(titlesOnly)];
}
function buildOptions(uniqueList) {
return uniqueList.map(curr => {
return {label:curr, value:curr};
});
}
}

export function departement_change(event, $w) {
uniqueDropDown3();
$w(“#iVille”).enable();
}

function uniqueDropDown3 (){
wixData.query(“dataset1”)
.contains(“departement”, $w(“#iDepartement”).value)
.limit(10000)
.find()
.then(results => {
const uniqueTitles = getUniqueTitles(results.items);
$w(“#iVille”).options = buildOptions(uniqueTitles);
});
function getUniqueTitles(items) {
const titlesOnly = items.map(item => item.ville);
return [… new Set(titlesOnly)];
}
function buildOptions(uniqueList) {
return uniqueList.map(curr => {
return {label:curr, value:curr};
});
}
}

export function iVille_click(event, $w) {
filter($w(‘#iVille’).value);
}
function filter(title) {
$w(‘#dataset1’).setFilter(wixData.filter().contains(‘ville’, title));
}

export function reboot_click(event, $w) {
(‘ville’, $w(‘#iVille’).value = null )
$w(“#iVille”).resetValidityIndication();
(‘departement’, $w(‘#iDepartement’).value = null )
$w(“#iDepartement”).resetValidityIndication();
(‘region’, $w(‘#iRegion’).value = null )
$w(“#iRegion”).resetValidityIndication();
}

$w.onReady( function () {

$w('#reboot').onClick( **function**  () { 

    $w('#dataset1').setFilter(wixData.filter()); 

}) 

})

function text149_click(event) {
$w(‘#dataset1’).setFilter(wixData.filter());
$w(“#iVille”).value = “”
}

Always much better to start a new post if you have a new issue, otherwise fellow forum users might think that it has been replied to already or that you are simply replying to an old forum post.

As for your code, it looks like you are using the code from Nayeli (Code Queen) tutorial, so first you would be better off reaching out to her first as it is her own work.
https://codequeen.wixsite.com/dropdown/code
@code-queen

Plus, did you watch her youtube video about it too as that would explain it all for you.
https://www.youtube.com/watch?time_continue=2&v=EhXed0u6wh0

Otherwise, there are already samples for duplicates that you can look at as shown here.
https://gist.github.com/Salman2301/c8a7e6a99b18555fdfc32839bf13a62a
https://www.wix.com/corvid/forum/corvid-tips-and-updates/example-remove-duplicates-from-connected-dropdown-options-using-distinct-query

@givemeawhisky I think what @philippe is saying we are having to import/add images from any folder whether wix media manager or the computer to the collection. I believe we need to request the feature that enables uploading images directly from the csv to the collection with the rest of the fields. Also adding the paths from wix to the excel document is no different than selecting images one-by-one from the media manager directly to the collection.