const uploadImage = async (file) => {
  const formData = new FormData()
  formData.append('image', file)
  
  try {
    const response = await axios.post('/api/upload/', formData)
    // response.data.url 应该已经是完整的 URL
    return response.data.url
  } catch (error) {
    console.error('Upload failed:', error)
    throw error
  }
} 